mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -05:00
fixed missing removal of deleted data causing a crash when large messages cause an error in Global Router
This commit is contained in:
parent
176c3abd8c
commit
dea7c774b4
@ -587,7 +587,8 @@ RsGRouterAbstractMsgItem *GRouterDataInfo::addDataChunk(RsGRouterTransactionChun
|
||||
std::cerr << " ERROR: chunk numbering is wrong. Dropping." << std::endl;
|
||||
delete chunk ;
|
||||
delete incoming_data_buffer ;
|
||||
return NULL;
|
||||
incoming_data_buffer = NULL ;
|
||||
return NULL;
|
||||
}
|
||||
incoming_data_buffer->chunk_data = (uint8_t*)realloc((uint8_t*)incoming_data_buffer->chunk_data,incoming_data_buffer->chunk_size + chunk->chunk_size) ;
|
||||
memcpy(&incoming_data_buffer->chunk_data[incoming_data_buffer->chunk_size],chunk->chunk_data,chunk->chunk_size) ;
|
||||
|
Loading…
Reference in New Issue
Block a user