You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/03/30 20:12:46 UTC

mesos git commit: Removed the redundant `NULL` check when deleting `Credential`.

Repository: mesos
Updated Branches:
  refs/heads/master b2c92eef8 -> d5d4f3c83


Removed the redundant `NULL` check when deleting `Credential`.

See summary. Also moved all \`delete\` statements together in the order they
were declared in `.hpp` file.

Review: https://reviews.apache.org/r/45466/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d5d4f3c8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d5d4f3c8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d5d4f3c8

Branch: refs/heads/master
Commit: d5d4f3c8355f4abc19c4226bc23d4c2f2b5a5f6a
Parents: b2c92ee
Author: Anand Mazumdar <ma...@gmail.com>
Authored: Wed Mar 30 11:12:21 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Wed Mar 30 11:12:21 2016 -0700

----------------------------------------------------------------------
 src/sched/sched.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d5d4f3c8/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 701e024..d989cb5 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -1805,14 +1805,11 @@ MesosSchedulerDriver::~MesosSchedulerDriver()
     // driver.
     terminate(process);
     wait(process);
-    delete process;
-  }
-
-  if (credential != NULL) {
-    delete credential;
   }
 
+  delete process;
   delete latch;
+  delete credential;
 
   detector.reset();