From 6928b3c4260967e169591256e03be7749722dee6 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 9 Aug 2009 15:55:31 +0000 Subject: [PATCH] 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 --- libretroshare/src/ft/ftfileprovider.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/ft/ftfileprovider.cc b/libretroshare/src/ft/ftfileprovider.cc index 8db205892..8ed176cc6 100644 --- a/libretroshare/src/ft/ftfileprovider.cc +++ b/libretroshare/src/ft/ftfileprovider.cc @@ -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; }