Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | openldap: set pointer |
| 2 | |
| 3 | When the function ldap_pvt_thread_pool_getkey() succeeds, it |
| 4 | must set the value of *data since the caller may try to use it. |
| 5 | |
| 6 | Upstream-Status: pending |
| 7 | |
| 8 | Signed-off-by: Joe Slater <jslater@windriver.com> |
| 9 | |
| 10 | |
| 11 | --- a/libraries/libldap_r/thr_stub.c |
| 12 | +++ b/libraries/libldap_r/thr_stub.c |
| 13 | @@ -217,6 +217,7 @@ ldap_pvt_thread_pool_unidle ( ldap_pvt_t |
| 14 | int ldap_pvt_thread_pool_getkey ( |
| 15 | void *ctx, void *key, void **data, ldap_pvt_thread_pool_keyfree_t **kfree ) |
| 16 | { |
| 17 | + if (data) *data = NULL; /* avoid problems with uninitialized *data */ |
| 18 | return(0); |
| 19 | } |
| 20 | |