forked from enlightenment/efl
Initialize 'd' to -1 so we can check on 'end' if it needs closing
Signed-off-by: Chris Michael <devilhorns@comcast.net>
This commit is contained in:
parent
207ad636fe
commit
a144495daa
|
@ -543,7 +543,7 @@ EAPI Eina_Bool
|
|||
eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Eina_File_Copy_Progress cb, const void *cb_data)
|
||||
{
|
||||
struct stat st;
|
||||
int s, d;
|
||||
int s, d = -1;
|
||||
Eina_Bool success;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(src, EINA_FALSE);
|
||||
|
@ -570,7 +570,7 @@ eina_file_copy(const char *src, const char *dst, Eina_File_Copy_Flags flags, Ein
|
|||
}
|
||||
|
||||
end:
|
||||
close(d);
|
||||
if (d > 0) close(d);
|
||||
close(s);
|
||||
|
||||
if (!success)
|
||||
|
|
Loading…
Reference in New Issue