]> git.sur5r.net Git - openldap/commitdiff
ITS#3981 ch_realloc( addr, 0 ) frees addr, return NULL
authorHoward Chu <hyc@openldap.org>
Fri, 9 Sep 2005 07:06:58 +0000 (07:06 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 9 Sep 2005 07:06:58 +0000 (07:06 +0000)
servers/slapd/ch_malloc.c

index 2b698fa1779ae7abb5067fee2cde715bdc742e1a..5ea673525445f0ad43abb2caa42f83cabcc2606f 100644 (file)
@@ -75,6 +75,7 @@ ch_realloc(
 
        if( size == 0 ) {
                ch_free( block );
+               return NULL;
        }
 
        ctx = slap_sl_context( block );