mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix memory leak in str2entry
This commit is contained in:
parent
cddf7e0e00
commit
102cb93220
@ -139,6 +139,7 @@ str2entry( char *s )
|
|||||||
}
|
}
|
||||||
|
|
||||||
rc = dnPretty( NULL, &value, &pdn );
|
rc = dnPretty( NULL, &value, &pdn );
|
||||||
|
free( value.bv_val );
|
||||||
if( rc != LDAP_SUCCESS ) {
|
if( rc != LDAP_SUCCESS ) {
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
|
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
|
||||||
@ -151,7 +152,6 @@ str2entry( char *s )
|
|||||||
(long) e->e_id,
|
(long) e->e_id,
|
||||||
pdn->bv_val ? pdn->bv_val : "", 0 );
|
pdn->bv_val ? pdn->bv_val : "", 0 );
|
||||||
#endif
|
#endif
|
||||||
if( value.bv_val != NULL ) free( value.bv_val );
|
|
||||||
entry_free( e );
|
entry_free( e );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user