Skip to content
Snippets Groups Projects
Commit f13d97e0 authored by Sang Seok Lim's avatar Sang Seok Lim
Browse files

Fix memory leak in a component encoder

parent ebd026cd
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment