summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap/ldb_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_ldap/ldb_ldap.c')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 4f840868a1..540dfc690b 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -52,7 +52,7 @@ struct lldb_private {
struct lldb_async_context {
struct ldb_module *module;
int msgid;
- uint32_t timeout;
+ int timeout;
void *context;
int (*callback)(struct ldb_context *, void *, struct ldb_async_result *);
};
@@ -398,7 +398,10 @@ static int lldb_search_bytree(struct ldb_module *module, const struct ldb_dn *ba
if (ret != LDB_SUCCESS)
return ret;
- return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+ ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+
+ talloc_free(handle);
+ return ret;
}
/*
@@ -469,7 +472,10 @@ static int lldb_add(struct ldb_module *module, const struct ldb_message *msg)
if (ret != LDB_SUCCESS)
return ret;
- return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+ ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+
+ talloc_free(handle);
+ return ret;
}
@@ -541,7 +547,10 @@ static int lldb_modify(struct ldb_module *module, const struct ldb_message *msg)
if (ret != LDB_SUCCESS)
return ret;
- return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+ ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+
+ talloc_free(handle);
+ return ret;
}
/*
@@ -601,7 +610,10 @@ static int lldb_delete(struct ldb_module *module, const struct ldb_dn *dn)
if (ret != LDB_SUCCESS)
return ret;
- return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+ ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+
+ talloc_free(handle);
+ return ret;
}
/*
@@ -681,7 +693,10 @@ static int lldb_rename(struct ldb_module *module, const struct ldb_dn *olddn, co
if (ret != LDB_SUCCESS)
return ret;
- return ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+ ret = ldb_async_wait(module->ldb, handle, LDB_WAIT_ALL);
+
+ talloc_free(handle);
+ return ret;
}
static int lldb_parse_result(struct ldb_async_handle *handle, LDAPMessage *result)