shot - handle error path and don't double close fd

fix CID 1425213
This commit is contained in:
Carsten Haitzler 2020-04-19 01:10:55 +01:00
parent 8f019a4ef7
commit 569146ed6a
1 changed files with 1 additions and 4 deletions

View File

@ -158,10 +158,7 @@ save_to(const char *file)
}
}
else
{
close(fd);
free(data);
}
free(data);
}
if (!thdat) close(fd);
eina_tmpstr_del(path);