From 25323de5cbc096c9feb42ea6887c6caad3e44965 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 5 Nov 1999 22:46:45 +0000 Subject: [PATCH] Fix to prevent freeing the same pointer twice on mod errors --- servers/slapd/modify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ); -- 2.39.5