ctdb-freeze: simplify code with TALLOC_FREE
authorAmitay Isaacs <amitay@gmail.com>
Thu, 28 Aug 2014 06:59:52 +0000 (16:59 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 7 Oct 2015 12:53:27 +0000 (14:53 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_freeze.c

index e5f9cab5339ea2b12370795ea3e50efdd097a128..f911207b7838313afc937f66766f41c4147f7512 100644 (file)
@@ -581,10 +581,7 @@ static void thaw_priority(struct ctdb_context *ctdb, uint32_t priority)
        }
 
        ctdb_db_prio_iterator(ctdb, priority, db_thaw, NULL);
-       if (ctdb->freeze_handles[priority] != NULL) {
-               talloc_free(ctdb->freeze_handles[priority]);
-               ctdb->freeze_handles[priority] = NULL;
-       }
+       TALLOC_FREE(ctdb->freeze_handles[priority]);
 }
 
 /*