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; } }