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:
committed by
Gerald (Jerry) Carter
parent
d791fd7b7b
commit
6978225ffc
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user