From d08f8ab4336583150ca072250bd71076a5c1e366 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 15 Oct 2006 21:40:49 +0000 Subject: r19297: fixed a leak in the ejs ldb interface (This used to be commit 6978225ffcc12ffdda0d3404e855219808c0597c) --- source4/scripting/ejs/smbcalls_ldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/scripting/ejs/smbcalls_ldb.c') diff --git a/source4/scripting/ejs/smbcalls_ldb.c b/source4/scripting/ejs/smbcalls_ldb.c index d5735dce70..f8296b9d36 100644 --- a/source4/scripting/ejs/smbcalls_ldb.c +++ b/source4/scripting/ejs/smbcalls_ldb.c @@ -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; -- cgit