mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-12 01:09:26 -04:00
added missing initialisation of deleted memory before calling realloc
This commit is contained in:
parent
0ff2941adf
commit
ca003c5f9e
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue