[PATCH 2/2] Revert "s4-dsdb Don't talloc_free() ares on failure, as LDB might free it later"

Andrew Bartlett abartlet at samba.org
Thu Dec 16 14:43:33 MST 2010


This reverts commit 25163380239abbad28f1656c42e6fab1b92473d9 because
further analyis showed the real problem was introduced in 0941099a
(which changed the caller behaviour, but only for indexed searches).

Andrew Bartlett
---
 source4/dsdb/samdb/ldb_modules/descriptor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index b96e5b5..0ea91ba 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -545,6 +545,7 @@ static int descriptor_search_callback(struct ldb_request *req, struct ldb_reply
 	}
 
 fail:
+	talloc_free(ares);
 	return ldb_module_done(ac->req, NULL, NULL, ret);
 }
 
-- 
1.7.3.3


--=-qZyMMvbSScfaUdMAor+O
Content-Disposition: attachment; filename*0=0001-lib-ldb-Remove-talloc_free-that-causes-double-free-i.pat; filename*1=ch
Content-Type: text/x-patch; name="0001-lib-ldb-Remove-talloc_free-that-causes-double-free-i.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the samba-technical mailing list