diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-15 21:40:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:04 -0500 |
commit | d08f8ab4336583150ca072250bd71076a5c1e366 (patch) | |
tree | dce1c4c77b0ee5cff579f6373cbdf7f53211c7b7 /source4/scripting | |
parent | ba68ee4cd40ca6a5d17fedf621bc17d966d9bd48 (diff) | |
download | samba-d08f8ab4336583150ca072250bd71076a5c1e366.tar.gz samba-d08f8ab4336583150ca072250bd71076a5c1e366.tar.bz2 samba-d08f8ab4336583150ca072250bd71076a5c1e366.zip |
r19297: fixed a leak in the ejs ldb interface
(This used to be commit 6978225ffcc12ffdda0d3404e855219808c0597c)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/ejs/smbcalls_ldb.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |