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:
Meep-Eep
2008-08-30 19:23:43 +00:00
parent b34e03b393
commit 56fd1c48a4
+3
View File
@@ -407,7 +407,10 @@ stdio_getPDirEntryHandle(const uio_PDirHandle *pDirHandle, const char *name) {
} }
if (stat(path, &statBuf) == -1) { if (stat(path, &statBuf) == -1) {
// errno is set.
int savedErrno = errno;
uio_free(path); uio_free(path);
errno = savedErrno;
return NULL; return NULL;
} }
uio_free(path); uio_free(path);