Keep errno over uio_free().
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3060 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -407,7 +407,10 @@ stdio_getPDirEntryHandle(const uio_PDirHandle *pDirHandle, const char *name) {
|
||||
}
|
||||
|
||||
if (stat(path, &statBuf) == -1) {
|
||||
// errno is set.
|
||||
int savedErrno = errno;
|
||||
uio_free(path);
|
||||
errno = savedErrno;
|
||||
return NULL;
|
||||
}
|
||||
uio_free(path);
|
||||
|
||||
Reference in New Issue
Block a user