mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 15:30:31 -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
|
@ -34,6 +34,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util/rsmemory.h"
|
||||
#include "retroshare/rstypes.h"
|
||||
|
||||
/*******************************************************************
|
||||
|
@ -181,7 +182,7 @@ class RsRawItem: public RsItem
|
|||
RsRawItem(uint32_t t, uint32_t size)
|
||||
:RsItem(t), len(size)
|
||||
{
|
||||
data = malloc(len);
|
||||
data = rs_safe_malloc(len);
|
||||
}
|
||||
|
||||
virtual ~RsRawItem()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue