libctdb: fix uninitialized field usage on ctdb_attach failure path
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 18 Jun 2010 06:17:23 +0000 (15:47 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 18 Jun 2010 06:17:23 +0000 (15:47 +0930)
Found by ctdb-test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
libctdb/ctdb.c

index 3d587c741948d710f67ce2cdc9d8cf8eac9c021d..527cb7891b1359b091e6670e60f36e04d464c4e3 100644 (file)
@@ -610,7 +610,7 @@ ctdb_attachdb_send(struct ctdb_connection *ctdb,
        req = new_ctdb_control_request(ctdb, opcode, CTDB_CURRENT_NODE, name,
                                       strlen(name) + 1, attachdb_done, db);
        if (!req) {
-               DEBUG(db->ctdb, LOG_ERR,
+               DEBUG(ctdb, LOG_ERR,
                      "ctdb_attachdb_send: failed allocating DB_ATTACH");
                free(db);
                return NULL;