diff options
-rw-r--r-- | source3/groupdb/mapping_ldb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c index 454fe467a9..6775f612e7 100644 --- a/source3/groupdb/mapping_ldb.c +++ b/source3/groupdb/mapping_ldb.c @@ -310,7 +310,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_ int i, ret; char *expr; fstring name; - struct ldb_result *res; + struct ldb_result *res = NULL; struct ldb_dn *basedn=NULL; TALLOC_CTX *tmp_ctx; @@ -333,6 +333,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_ } ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res); + talloc_steal(tmp_ctx, res); if (ret != LDB_SUCCESS) goto failed; (*pp_rmap) = NULL; |