1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-24 15:33:20 +03:00

r19297: fixed a leak in the ejs ldb interface

This commit is contained in:
Andrew Tridgell
2006-10-15 21:40:49 +00:00
committed by Gerald (Jerry) Carter
parent d791fd7b7b
commit 6978225ffc

View File

@@ -60,7 +60,7 @@ static int ejs_ldbSearch(MprVarHandle eid, int argc, struct MprVar **argv)
TALLOC_CTX *tmp_ctx = talloc_new(mprMemCtx());
struct ldb_context *ldb;
int ret;
struct ldb_result *res;
struct ldb_result *res=NULL;
/* validate arguments */
if (argc < 1 || argc > 4) {
@@ -112,7 +112,7 @@ static int ejs_ldbSearch(MprVarHandle eid, int argc, struct MprVar **argv)
} else {
mpr_Return(eid, mprLdbArray(ldb, res->msgs, res->count, "ldb_message"));
}
talloc_free(res);
talloc_free(tmp_ctx);
return 0;