From: Ralph Boehme Date: Sun, 4 Mar 2018 22:39:05 +0000 (+0100) Subject: dbwrap_ctdb: add error checking to ctdbd_dbpath() X-Git-Tag: tdb-1.3.17~1638 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cafbc50d9cc4c1b3b985cc1398d184e0a1a75b7;p=thirdparty%2Fsamba.git dbwrap_ctdb: add error checking to ctdbd_dbpath() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 2885f4e7fda..a5f27658a03 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1856,6 +1856,11 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, db_path = ctdbd_dbpath(messaging_ctdb_connection(), db_ctdb, db_ctdb->db_id); + if (db_path == NULL) { + DBG_ERR("ctdbd_dbpath failed\n"); + TALLOC_FREE(result); + return NULL; + } result->persistent = persistent; result->lock_order = lock_order;