eio - fix possible stringhare del bug in dir chmod

coverity picked this up - CID 1039645. it does indeed look like a real
bug. if order->dirs is empty. for example.
This commit is contained in:
Carsten Haitzler 2014-08-14 19:40:54 +09:00
parent 8da87146b4
commit 257e853407
1 changed files with 2 additions and 1 deletions

View File

@ -305,7 +305,7 @@ _eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
int length_source, int length_dest,
Eina_Bool rmdir_source)
{
const char *dir;
const char *dir = NULL;
char target[PATH_MAX];
struct stat buffer;
@ -343,6 +343,7 @@ _eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
goto on_cancel;
eina_stringshare_del(dir);
dir = NULL;
}
return EINA_TRUE;