From 102cb932209b8fbdfd29ecb4f1b4101e7dd407c2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 27 Dec 2001 10:25:50 +0000 Subject: [PATCH] Fix memory leak in str2entry --- servers/slapd/entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 78ca41f9af..afc4272132 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -139,6 +139,7 @@ str2entry( char *s ) } rc = dnPretty( NULL, &value, &pdn ); + free( value.bv_val ); if( rc != LDAP_SUCCESS ) { #ifdef NEW_LOGGING LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: " @@ -151,7 +152,6 @@ str2entry( char *s ) (long) e->e_id, pdn->bv_val ? pdn->bv_val : "", 0 ); #endif - if( value.bv_val != NULL ) free( value.bv_val ); entry_free( e ); return NULL; } -- 2.39.5