c_time: Fix resource leak in error case

This fixes Coverity CID 12903
This commit is contained in:
Daniel Molkentin 2014-06-20 10:39:13 +02:00
parent 6b041b0846
commit f9710cc1d5

View file

@ -135,7 +135,8 @@ int c_utimes(const char *uri, const struct timeval *times) {
if(!SetFileTime(hFile, NULL, &LastAccessTime, &LastModificationTime)) {
//can this happen?
errno=ENOENT;
CloseHandle(hFile);
CloseHandle(hFile);
c_free_locale_string(wuri);
return -1;
}