]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb:util: dsdb_module_dn initialises on failure
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 31 Jul 2024 01:31:02 +0000 (13:31 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 28 Aug 2024 04:24:39 +0000 (04:24 +0000)
I think this may be a root cause of some Coverity false positives.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <josutton@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/util.c

index b343828d5084c9ec3cb7dc8643bac41b788135da..df70c8ed8863c2ee3d08422d44ab12e8459799f9 100644 (file)
@@ -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;
        }