mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-14 17:15:47 -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
|
@ -4,7 +4,7 @@
|
|||
#include <iostream>
|
||||
#include <util/stacktrace.h>
|
||||
|
||||
void *rs_safe_malloc(size_t size) ;
|
||||
void *rs_malloc(size_t size) ;
|
||||
|
||||
// This is a scope guard to release the memory block when going of of the current scope.
|
||||
// Can be very useful to auto-delete some memory on quit without the need to call free each time.
|
||||
|
@ -28,7 +28,7 @@ class RsTemporaryMemory
|
|||
public:
|
||||
RsTemporaryMemory(size_t s)
|
||||
{
|
||||
_mem = (unsigned char *)rs_safe_malloc(s) ;
|
||||
_mem = (unsigned char *)rs_malloc(s) ;
|
||||
|
||||
if(_mem)
|
||||
_size = s ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue