mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-25 09:11:28 -05:00
added missing initialisation of deleted memory before calling realloc
This commit is contained in:
parent
0ff2941adf
commit
ca003c5f9e
@ -1024,6 +1024,7 @@ RsItem *pqistreamer::addPartialPacket(const void *block, uint32_t len, uint32_t
|
|||||||
{
|
{
|
||||||
std::cerr << "(WW) dropping unfinished existing packet that gets to be replaced by new starting packet." << std::endl;
|
std::cerr << "(WW) dropping unfinished existing packet that gets to be replaced by new starting packet." << std::endl;
|
||||||
free(rec.mem);
|
free(rec.mem);
|
||||||
|
rec.mem = NULL ;
|
||||||
rec.size = 0 ;
|
rec.size = 0 ;
|
||||||
}
|
}
|
||||||
// make sure this is a continuing packet, otherwise this is an error.
|
// make sure this is a continuing packet, otherwise this is an error.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user