pidgin: cacbffac: Don't leak an fd if we can't open the de...
markdoliner at pidgin.im
markdoliner at pidgin.im
Fri Mar 27 06:20:39 EDT 2009
-----------------------------------------------------------------
Revision: cacbffacf83d80fc6c16a5641a71031a1ed4ef3a
Ancestor: c1f46df916c4667fc4757d76b28d5db90e90d58a
Author: markdoliner at pidgin.im
Date: 2009-03-27T10:16:46
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cacbffacf83d80fc6c16a5641a71031a1ed4ef3a
Modified files:
pidgin/win32/untar.c
ChangeLog:
Don't leak an fd if we can't open the destination file when untarring
-------------- next part --------------
============================================================
--- pidgin/win32/untar.c d36e09048246db8c98324a65dde831273c12bed1
+++ pidgin/win32/untar.c ecb8277cf5ee35788236967717b64d4de9bf6389
@@ -212,9 +212,11 @@ static void linkorcopy(src, dst, sym)
* make sure the directory path exists.
*/
fpdst = createpath(dst);
- if (!fpdst)
+ if (!fpdst) {
/* error message already given */
+ fclose(fpsrc);
return;
+ }
#ifdef _POSIX_SOURCE
# ifndef _WEAK_POSIX
More information about the Commits
mailing list