ctdb-recoverd: Simplify using TALLOC_FREE()
authorMartin Schwenke <martin@meltin.net>
Tue, 31 Mar 2015 02:59:02 +0000 (13:59 +1100)
committerAmitay Isaacs <amitay@samba.org>
Sun, 10 May 2015 01:22:13 +0000 (03:22 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c

index 0e6cf4bafd240eacb2ba6d4544a13935961e85d9..e0eb7d60b660a650759f5c32f7eda478b13e30cb 100644 (file)
@@ -2743,8 +2743,7 @@ static void election_handler(struct ctdb_context *ctdb, uint64_t srvid,
        }
 
        /* we didn't win */
-       talloc_free(rec->send_election_te);
-       rec->send_election_te = NULL;
+       TALLOC_FREE(rec->send_election_te);
 
         if (ctdb->recovery_lock_file != NULL) {
                /* Release the recovery lock file */