From 3f83d029dea02798612403c52042ec11003e3d92 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 31 Jul 2024 13:31:02 +1200 Subject: [PATCH] dsdb:util: dsdb_module_dn initialises on failure I think this may be a root cause of some Coverity false positives. Signed-off-by: Douglas Bagnall Reviewed-by: Jennifer Sutton --- source4/dsdb/samdb/ldb_modules/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index b343828d508..df70c8ed886 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -887,6 +887,7 @@ int dsdb_module_reference_dn(struct ldb_module *module, TALLOC_CTX *mem_ctx, str ret = dsdb_module_search_dn(module, mem_ctx, &res, base, attrs, DSDB_FLAG_NEXT_MODULE | DSDB_SEARCH_SHOW_EXTENDED_DN, parent); if (ret != LDB_SUCCESS) { + *dn = NULL; return ret; }