From: Ondřej Kuzník Date: Tue, 11 Aug 2015 12:26:39 +0000 (+0200) Subject: ITS#8215 Remove a memory leak X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b47f32f6f2fa4531c5d068a49bbcaa42a925d73f;p=openldap ITS#8215 Remove a memory leak --- diff --git a/servers/slapd/slapmodify.c b/servers/slapd/slapmodify.c index b3cf23df67..63166c377e 100644 --- a/servers/slapd/slapmodify.c +++ b/servers/slapd/slapmodify.c @@ -425,12 +425,13 @@ slapmodify( int argc, char **argv ) break; } + ber_bvarray_free( mods.sm_values ); + ber_bvarray_free( mods.sm_nvalues ); + if ( local_rc != LDAP_SUCCESS ) { fprintf( stderr, "%s: DN=\"%s\": unable to modify attr=%s\n", progname, e->e_dn, mods.sm_desc->ad_cname.bv_val ); rc = EXIT_FAILURE; - ber_bvarray_free( mods.sm_values ); - ber_bvarray_free( mods.sm_nvalues ); goto cleanup; } }