Skip to content

Commit c6f969e

Browse files
committed
check for initialize failure
1 parent bcef266 commit c6f969e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/ldap/base.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,8 @@ LDAP *fr_ldap_handle_thread_local(void)
11341134
if (!ldap_thread_local_handle) {
11351135
LDAP *handle;
11361136

1137-
ldap_initialize(&handle, "");
1137+
MEM(ldap_initialize(&ldap_thread_local_handle, "") == LDAP_SUCCESS);
1138+
handle = ldap_thread_local_handle;
11381139

11391140
fr_atexit_thread_local(ldap_thread_local_handle, _ldap_handle_thread_local_free, handle);
11401141
}

0 commit comments

Comments
 (0)