From 56bacd2b44f975f34b101561b9a38660dd04d499 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Oct 2006 11:57:44 +0000 Subject: r19330: Fix memleaks (This used to be commit f163f422e3f201d8b0e22538949eccf0f7e62143) --- source4/dsdb/samdb/ldb_modules/samldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules/samldb.c') diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index f6070d518c..f589ba859d 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; } -- cgit