From: Douglas Bagnall Date: Wed, 8 May 2019 03:05:21 +0000 (+1200) Subject: dsdb/mod/count_attrs: set ldb var before using it (CID 1444979) X-Git-Tag: tdb-1.4.1~114 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79111dd0d061894c767a01fd60a5b5c43d98ab42;p=thirdparty%2Fsamba.git dsdb/mod/count_attrs: set ldb var before using it (CID 1444979) Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Autobuild-User(master): Douglas Bagnall Autobuild-Date(master): Thu May 9 23:54:35 UTC 2019 on sn-devel-184 --- diff --git a/source4/dsdb/samdb/ldb_modules/count_attrs.c b/source4/dsdb/samdb/ldb_modules/count_attrs.c index 2518492e813..b0d1b224944 100644 --- a/source4/dsdb/samdb/ldb_modules/count_attrs.c +++ b/source4/dsdb/samdb/ldb_modules/count_attrs.c @@ -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);