mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +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());
|
TALLOC_CTX *tmp_ctx = talloc_new(mprMemCtx());
|
||||||
struct ldb_context *ldb;
|
struct ldb_context *ldb;
|
||||||
int ret;
|
int ret;
|
||||||
struct ldb_result *res;
|
struct ldb_result *res=NULL;
|
||||||
|
|
||||||
/* validate arguments */
|
/* validate arguments */
|
||||||
if (argc < 1 || argc > 4) {
|
if (argc < 1 || argc > 4) {
|
||||||
@@ -112,7 +112,7 @@ static int ejs_ldbSearch(MprVarHandle eid, int argc, struct MprVar **argv)
|
|||||||
} else {
|
} else {
|
||||||
mpr_Return(eid, mprLdbArray(ldb, res->msgs, res->count, "ldb_message"));
|
mpr_Return(eid, mprLdbArray(ldb, res->msgs, res->count, "ldb_message"));
|
||||||
}
|
}
|
||||||
|
talloc_free(res);
|
||||||
talloc_free(tmp_ctx);
|
talloc_free(tmp_ctx);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user