From: Howard Chu Date: Fri, 31 Mar 2006 21:20:36 +0000 (+0000) Subject: cleanup NULL deref X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~74 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de36ebd08cc0f0d69a388d268fa213d7c5a07965;p=openldap cleanup NULL deref --- diff --git a/libraries/libldap_r/rdwr.c b/libraries/libldap_r/rdwr.c index 81febcbd2d..45f642de4f 100644 --- a/libraries/libldap_r/rdwr.c +++ b/libraries/libldap_r/rdwr.c @@ -78,6 +78,8 @@ ldap_pvt_thread_rdwr_init( ldap_pvt_thread_rdwr_t *rwlock ) rw = (struct ldap_int_thread_rdwr_s *) LDAP_CALLOC( 1, sizeof( struct ldap_int_thread_rdwr_s ) ); + if ( !rw ) + return LDAP_NO_MEMORY; /* we should check return results */ ldap_pvt_thread_mutex_init( &rw->ltrw_mutex );