mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 18:29:02 -04:00
added a new method rs_malloc that checks its arguments and prints a stacktrace on error/weird call. Changed the code everywhere to use this instead of malloc. Removed some mallocs and replaced with RsTemporaryMemory
This commit is contained in:
parent
9c6e7dfc13
commit
d13526facd
39 changed files with 274 additions and 132 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "serialiser/rsbaseserial.h"
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "util/rsprint.h"
|
||||
#include "util/rsmemory.h"
|
||||
|
||||
#include "gxstunnel/rsgxstunnelitems.h"
|
||||
|
||||
|
@ -393,7 +394,7 @@ RsGxsTunnelDataItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelDataItem(void
|
|||
delete item ;
|
||||
return NULL ;
|
||||
}
|
||||
item->data = (unsigned char*)malloc(item->data_size) ;
|
||||
item->data = (unsigned char*)rs_safe_malloc(item->data_size) ;
|
||||
|
||||
if(item->data == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue