From: Luke Howard Date: Tue, 21 Jan 2003 15:44:04 +0000 (+0000) Subject: Fixed crashed in slapi_value_free X-Git-Tag: NO_SLAP_OP_BLOCKS~552 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fb22bdeb58a3b942e3df073f294b1e5daac8cbf2;p=openldap Fixed crashed in slapi_value_free --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index a59f5e1d9b..4887da032b 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1747,11 +1747,10 @@ void slapi_value_free(Slapi_Value **value) if ( value == NULL ) { return; } - if ( *value != NULL ) { - Slapi_Value *v; - slapi_ch_free( (void **)&v->bv_val ); - slapi_ch_free( (void **)&v ); + if ( (*value) != NULL ) { + slapi_ch_free( (void **)&(*value)->bv_val ); + slapi_ch_free( (void **)value ); } #endif }