From: Howard Chu Date: Fri, 5 Nov 1999 22:46:45 +0000 (+0000) Subject: Fix to prevent freeing the same pointer twice on mod errors X-Git-Tag: UCDATA_2_4~242 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=25323de5cbc096c9feb42ea6887c6caad3e44965;p=openldap Fix to prevent freeing the same pointer twice on mod errors --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 705cab59db..7d1fc71abd 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -244,8 +244,6 @@ do_modify( cleanup: free( dn ); free( ndn ); - if ( modtail != NULL && *modtail != NULL ) - free( *modtail ); if ( modlist != NULL ) modlist_free( modlist ); return rc; @@ -315,7 +313,9 @@ modlist_free( for ( ; ml != NULL; ml = next ) { next = ml->ml_next; - free( ml->ml_type ); + if (ml->ml_type) + free( ml->ml_type ); + if ( ml->ml_bvalues != NULL ) ber_bvecfree( ml->ml_bvalues );