From: Stefan Metzmacher Date: Fri, 1 Feb 2013 08:14:16 +0000 (-0500) Subject: s3:dbwrap_ctdb: setup result->name in db_open_ctdb() X-Git-Tag: tevent-0.9.18~310 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25bdab9c6140a04dfb33e5b4118f45e8d8489d86;p=thirdparty%2Fsamba.git s3:dbwrap_ctdb: setup result->name in db_open_ctdb() Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index c96dda29fc0..dd0f4eac324 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -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;