mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
Fix memory leak in a component encoder
This commit is contained in:
parent
ebd026cd7f
commit
f13d97e09c
1 changed files with 4 additions and 0 deletions
|
|
@ -760,11 +760,14 @@ comp_component_encoder ( void* mem_op, ComponentSyntaxInfo* csi , struct berval*
|
|||
* use nibble memory in it
|
||||
*/
|
||||
free ( bv.bv_val );
|
||||
GenBufFreeBuf( b );
|
||||
BufFreeBuf( buf );
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
rc = csi->csi_comp_desc->cd_gser_encoder( b, csi );
|
||||
if ( rc < 0 ) {
|
||||
GenBufFreeBuf( b );
|
||||
BufFreeBuf( buf );
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -780,6 +783,7 @@ comp_component_encoder ( void* mem_op, ComponentSyntaxInfo* csi , struct berval*
|
|||
BufCopy( nval->bv_val, b, size );
|
||||
}
|
||||
ExpBufFreeBuf( buf );
|
||||
GenBufFreeBuf( b );
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue