aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/openldap/openldap-2.4.40/thread_stub.patch
blob: 540ba4a63585b5f630b58bd51be2d51d336fe668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
openldap: set pointer

When the function ldap_pvt_thread_pool_getkey() succeeds, it
must set the value of *data since the caller may try to use it.

Upstream-Status: pending

Signed-off-by: Joe Slater <jslater@windriver.com>


--- a/libraries/libldap_r/thr_stub.c
+++ b/libraries/libldap_r/thr_stub.c
@@ -217,6 +217,7 @@ ldap_pvt_thread_pool_unidle ( ldap_pvt_t
 int ldap_pvt_thread_pool_getkey (
 	void *ctx, void *key, void **data, ldap_pvt_thread_pool_keyfree_t **kfree )
 {
+	if (data) *data = NULL;  /* avoid problems with uninitialized *data */
 	return(0);
 }