mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added missing delete causing mem leak in GXS distant search
This commit is contained in:
parent
f61b37e10b
commit
1abd206443
1 changed files with 4 additions and 0 deletions
|
@ -1045,6 +1045,8 @@ bool RsGxsNetTunnelService::receiveSearchRequest(unsigned char *search_request_d
|
|||
search_result_data_size = RsGxsNetTunnelSerializer().size(&search_result_item) ;
|
||||
search_result_data = (unsigned char*)rs_malloc(search_result_data_size) ;
|
||||
|
||||
delete item;
|
||||
|
||||
if(search_result_data == NULL)
|
||||
return false ;
|
||||
|
||||
|
@ -1082,10 +1084,12 @@ bool RsGxsNetTunnelService::receiveSearchRequest(unsigned char *search_request_d
|
|||
|
||||
RsGxsNetTunnelSerializer().serialise(&search_result_item,search_result_data,&search_result_data_size);
|
||||
|
||||
delete item;
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
|
||||
delete item;
|
||||
return false ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue