fixed a memory leak in the recovery daemon
authorAndrew Tridgell <tridge@samba.org>
Mon, 11 Aug 2008 13:33:05 +0000 (23:33 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 11 Aug 2008 13:33:05 +0000 (23:33 +1000)
thanks to vl for spotting this

server/ctdb_recoverd.c

index 329522991d3ec0b52b27b24cfbb1d06540dbdb33..c503aa5489a8472487634d206dc4ca4d7528af4b 100644 (file)
@@ -2153,7 +2153,7 @@ static int verify_ip_allocation(struct ctdb_context *ctdb, uint32_t pnn)
        struct ctdb_uptime *uptime2 = NULL;
        int ret, j;
 
-       ret = ctdb_ctrl_uptime(ctdb, ctdb, CONTROL_TIMEOUT(),
+       ret = ctdb_ctrl_uptime(ctdb, mem_ctx, CONTROL_TIMEOUT(),
                                CTDB_CURRENT_NODE, &uptime1);
        if (ret != 0) {
                DEBUG(DEBUG_ERR, ("Unable to get uptime from local node %u\n", pnn));
@@ -2169,7 +2169,7 @@ static int verify_ip_allocation(struct ctdb_context *ctdb, uint32_t pnn)
                return -1;
        }
 
-       ret = ctdb_ctrl_uptime(ctdb, ctdb, CONTROL_TIMEOUT(),
+       ret = ctdb_ctrl_uptime(ctdb, mem_ctx, CONTROL_TIMEOUT(),
                                CTDB_CURRENT_NODE, &uptime2);
        if (ret != 0) {
                DEBUG(DEBUG_ERR, ("Unable to get uptime from local node %u\n", pnn));