From 9b64073cf733588b75c3780f2c18728ff3009500 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Apr 2009 14:27:59 +0200 Subject: ldb/samba3: Support event context argument to ldb_init(). This argument is ignored (Samba3's LDB is synchronous) but having it there is useful for API compatibility with the LDB used by Samba 4 and available on some systems. --- source3/libads/ldap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/libads/ldap.c') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index cc72d81b86..44a73cbfdb 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -3858,6 +3858,7 @@ ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx, struct ldb_dn *name_dn = NULL; const char *name = NULL; char *ou_string = NULL; + struct ldb_context *ldb = ldb_init(mem_ctx, NULL); name_dn = ldb_dn_explode(mem_ctx, *account_ou); if (name_dn) { @@ -3883,9 +3884,11 @@ ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx, *account_ou = talloc_strdup(mem_ctx, name); if (!*account_ou) { + talloc_free(ldb); return ADS_ERROR_LDAP(LDAP_NO_MEMORY); } + talloc_free(ldb); return ADS_SUCCESS; } -- cgit