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:
csoler 2016-01-12 21:10:11 -05:00
parent 9c6e7dfc13
commit d13526facd
39 changed files with 274 additions and 132 deletions

View file

@ -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)
{