From 24f85e81ca84bb77b4f200d692d33a361c3939ee Mon Sep 17 00:00:00 2001 From: darode Date: Fri, 16 Jul 2010 12:42:38 +0000 Subject: [PATCH] 2010-07-16 Dario Rodriguez * misc/pandora_file.cc: fixed error that caused double free. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3019 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 4 ++++ pandora_agents/win32/misc/pandora_file.cc | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 139600fee0..f045946166 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,7 @@ +2010-07-16 Dario Rodriguez + + * misc/pandora_file.cc: fixed error that caused double free. + 2010-07-16 Dario Rodriguez * misc/pandora_file.cc: fixed unclosed directory with function closedir diff --git a/pandora_agents/win32/misc/pandora_file.cc b/pandora_agents/win32/misc/pandora_file.cc index 9b8b110cff..dde0209d22 100644 --- a/pandora_agents/win32/misc/pandora_file.cc +++ b/pandora_agents/win32/misc/pandora_file.cc @@ -165,15 +165,11 @@ Pandora_File::removeDir (const string filepath) { if(errno == ENOTDIR) { if (remove (filepath.c_str ()) == -1) { - /*Close dir oppened*/ - closedir(dir); return DELETE_ERROR; } return 0; } else { - /*Close dir oppened*/ - closedir(dir); return DELETE_ERROR; } }