]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dbwrap_ctdb: add error checking to ctdbd_dbpath()
authorRalph Boehme <slow@samba.org>
Sun, 4 Mar 2018 22:39:05 +0000 (23:39 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 12 Sep 2018 20:25:19 +0000 (22:25 +0200)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/dbwrap/dbwrap_ctdb.c

index 2885f4e7fda34feab012e0084b1b5941b89a69eb..a5f27658a031065e61a183efca025fa3e8da3904 100644 (file)
@@ -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;