]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:dbwrap_ctdb: setup result->name in db_open_ctdb()
authorStefan Metzmacher <metze@samba.org>
Fri, 1 Feb 2013 08:14:16 +0000 (03:14 -0500)
committerMichael Adam <obnox@samba.org>
Mon, 4 Feb 2013 16:14:22 +0000 (17:14 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/lib/dbwrap/dbwrap_ctdb.c

index c96dda29fc07dc7febe8b2e85c47cec04a5393c3..dd0f4eac324d9b7a63b4bccf30ae46b41907b199 100644 (file)
@@ -1520,6 +1520,13 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
+       result->name = talloc_strdup(result, name);
+       if (result->name == NULL) {
+               DEBUG(0, ("talloc failed\n"));
+               TALLOC_FREE(result);
+               return NULL;
+       }
+
        db_ctdb->transaction = NULL;
        db_ctdb->db = result;