From 7fe963e320b7c4f391a4fbd4668666c816e531e8 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 28 Nov 2024 09:33:16 +1300 Subject: [PATCH] ldb_tdb: wrap can cope with NULL path Signed-off-by: Douglas Bagnall Reviewed-by: Ralph Boehme --- lib/ldb/ldb_tdb/ldb_tdb_wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c index bc702a22584..1de1f4723de 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c +++ b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c @@ -103,7 +103,7 @@ struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx, struct tdb_logging_context lctx; struct stat st; - if (stat(path, &st) == 0) { + if (path != NULL && stat(path, &st) == 0) { for (w=tdb_list;w;w=w->next) { if (st.st_dev == w->device && st.st_ino == w->inode) { pid_t pid = getpid(); -- 2.47.3