changeset 26318:22188571df65

Don't leak an fd if we can't open the destination file when untarring
author Mark Doliner <mark@kingant.net>
date Fri, 27 Mar 2009 10:16:46 +0000
parents a48bb75939df
children deb4203bef67
files pidgin/win32/untar.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/win32/untar.c	Fri Mar 27 10:15:38 2009 +0000
+++ b/pidgin/win32/untar.c	Fri Mar 27 10:16:46 2009 +0000
@@ -212,9 +212,11 @@
 	 * 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