tdb: Don't segfault if tdb_open_ex for check failed
authorVolker Lendecke <vl@samba.org>
Sat, 16 Feb 2013 21:07:41 +0000 (22:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 19 Feb 2013 14:46:45 +0000 (15:46 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/tools/tdbtorture.c

index 04bbb7da76a4b11dcf5ba6cb46f58b9a9acb5d35..760ad59313b5990b172e19e7453fcfc718a9e21f 100644 (file)
@@ -439,6 +439,7 @@ done:
                                 O_RDWR, 0, &log_ctx, NULL);
                if (!db) {
                        fatal("db open failed\n");
+                       exit(1);
                }
                if (tdb_check(db, NULL, NULL) == -1) {
                        printf("db check failed\n");