From b47f32f6f2fa4531c5d068a49bbcaa42a925d73f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 11 Aug 2015 14:26:39 +0200 Subject: [PATCH] ITS#8215 Remove a memory leak --- servers/slapd/slapmodify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } } -- 2.39.5