mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 14:50:54 -04:00
removed two instances of malloc(0) captured by new rs_malloc funtion
This commit is contained in:
parent
d13526facd
commit
d55993d1e4
35 changed files with 73 additions and 56 deletions
|
@ -86,7 +86,7 @@ RsGRouterTransactionChunkItem *RsGRouterSerialiser::deserialise_RsGRouterTransac
|
|||
delete item;
|
||||
return NULL ;
|
||||
}
|
||||
if( NULL == (item->chunk_data = (uint8_t*)rs_safe_malloc(item->chunk_size)))
|
||||
if( NULL == (item->chunk_data = (uint8_t*)rs_malloc(item->chunk_size)))
|
||||
{
|
||||
delete item;
|
||||
return NULL ;
|
||||
|
@ -149,7 +149,7 @@ RsGRouterGenericDataItem *RsGRouterSerialiser::deserialise_RsGRouterGenericDataI
|
|||
return NULL ;
|
||||
}
|
||||
|
||||
if( NULL == (item->data_bytes = (uint8_t*)rs_safe_malloc(item->data_size)))
|
||||
if( NULL == (item->data_bytes = (uint8_t*)rs_malloc(item->data_size)))
|
||||
{
|
||||
delete item;
|
||||
return NULL ;
|
||||
|
@ -346,7 +346,7 @@ RsGRouterGenericDataItem *RsGRouterGenericDataItem::duplicate() const
|
|||
|
||||
// then duplicate the memory chunk
|
||||
|
||||
item->data_bytes = (uint8_t*)rs_safe_malloc(data_size) ;
|
||||
item->data_bytes = (uint8_t*)rs_malloc(data_size) ;
|
||||
|
||||
if(item->data_bytes == NULL)
|
||||
return NULL ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue