mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-28 10:32:22 -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
|
@ -916,6 +916,12 @@ bool SSGxsChannelGroup::load(const std::string &input)
|
|||
mAutoDownload = false;
|
||||
mDownloadDirectory.clear();
|
||||
|
||||
if(input.empty())
|
||||
{
|
||||
std::cerr << "(EE) SSGxsChannelGroup::load() asked to load a null string. Weird." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
RsTemporaryMemory tmpmem(input.length());
|
||||
|
||||
if (1 == sscanf(input.c_str(), "D:%d", &download_val))
|
||||
|
|
|
@ -98,7 +98,7 @@ void RsGxsImage::take(uint8_t *data, uint32_t size)
|
|||
// NB Must make sure that we always use malloc/free for this data.
|
||||
uint8_t *RsGxsImage::allocate(uint32_t size)
|
||||
{
|
||||
uint8_t *val = (uint8_t *) rs_safe_malloc(size);
|
||||
uint8_t *val = (uint8_t *) rs_malloc(size);
|
||||
|
||||
#ifdef DEBUG_GXSCOMMON
|
||||
std::cerr << "RsGxsImage()::allocate(" << (void *) val << ")";
|
||||
|
|
|
@ -26,7 +26,7 @@ bool RsPhotoThumbnail::copyFrom(const RsPhotoThumbnail &nail)
|
|||
|
||||
size = nail.size;
|
||||
type = nail.type;
|
||||
data = (uint8_t *) rs_safe_malloc(size);
|
||||
data = (uint8_t *) rs_malloc(size);
|
||||
|
||||
if(data == NULL)
|
||||
return false ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue