mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-23 22:49:37 -05:00
fixed core dump (double delete) when getFileData fails
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1504 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
47fce35968
commit
6928b3c426
@ -124,8 +124,8 @@ bool ftFileProvider::getFileData(uint64_t offset, uint32_t &chunk_size, void *da
|
||||
|
||||
if (1 != fread(data, data_size, 1, fd))
|
||||
{
|
||||
std::cerr << "ftFileProvider::getFileData() Failed to get data!";
|
||||
free(data);
|
||||
std::cerr << "ftFileProvider::getFileData() Failed to get data. Data_size=" << data_size << ", base_loc=" << base_loc << " !";
|
||||
//free(data); No!! It's already freed upwards in ftDataMultiplex::locked_handleServerRequest()
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user