git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a2b46d
)
s4:libcli/ldap: ldap4_new_connection() requires a valid lp_ctx
author
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Apr 2024 19:01:08 +0000
(21:01 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 24 Apr 2024 09:17:57 +0000
(11:17 +0200)
Otherwise we'll crash in a lot of places later.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
8007569e9f7d374456a3fbd172a905173462eb5f
)
source4/libcli/ldap/ldap_client.c
patch
|
blob
|
history
diff --git
a/source4/libcli/ldap/ldap_client.c
b/source4/libcli/ldap/ldap_client.c
index a1cb631785842be145d9afd07df7e19ab61fce55..0f606ef255debd3d803e0f78dbebce3c7ec70c89 100644
(file)
--- a/
source4/libcli/ldap/ldap_client.c
+++ b/
source4/libcli/ldap/ldap_client.c
@@
-66,6
+66,10
@@
_PUBLIC_ struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
return NULL;
}
+ if (lp_ctx == NULL) {
+ return NULL;
+ }
+
conn = talloc_zero(mem_ctx, struct ldap_connection);
if (conn == NULL) {
return NULL;