]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb/mod/count_attrs: set ldb var before using it (CID 1444979)
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 8 May 2019 03:05:21 +0000 (15:05 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 9 May 2019 23:54:35 +0000 (23:54 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu May  9 23:54:35 UTC 2019 on sn-devel-184

source4/dsdb/samdb/ldb_modules/count_attrs.c

index 2518492e8131907e7b6b9853010a120440e4382b..b0d1b2249441290dd20d16149fdd1375efc942df 100644 (file)
@@ -567,12 +567,14 @@ static int count_attrs_init(struct ldb_module *module)
        struct count_attrs_private *data = NULL;
        struct loadparm_context *lp_ctx = NULL;
        int ret;
+
+       ldb = ldb_module_get_ctx(module);
+
        data = talloc_zero(module, struct count_attrs_private);
        if (data == NULL) {
                return ldb_oom(ldb);
        }
 
-       ldb = ldb_module_get_ctx(module);
        lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
                                 struct loadparm_context);