From: Simo Sorce Date: Mon, 16 Oct 2006 11:57:44 +0000 (+0000) Subject: r19330: Fix memleaks X-Git-Tag: samba-4.0.0alpha6~801^3~4471 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56bacd2b44f975f34b101561b9a38660dd04d499;p=thirdparty%2Fsamba.git r19330: Fix memleaks (This used to be commit f163f422e3f201d8b0e22538949eccf0f7e62143) --- diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index f6070d518c0..f589ba859df 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -130,7 +130,6 @@ static int samldb_find_next_rid(struct ldb_module *module, TALLOC_CTX *mem_ctx, if (ret != LDB_SUCCESS) { return ret; } - talloc_steal(mem_ctx, res); if (res->count != 1) { talloc_free(res); return LDB_ERR_OPERATIONS_ERROR; @@ -257,6 +256,7 @@ static int samldb_get_new_sid(struct ldb_module *module, ldb_asprintf_errstring(module->ldb, "samldb_get_new_sid: error retrieving domain sid from %s: not found!\n", ldb_dn_linearize(mem_ctx, dom_dn)); + talloc_free(res); return LDB_ERR_CONSTRAINT_VIOLATION; }