# HG changeset patch # User Paul Aurich # Date 1246225814 0 # Node ID 03525f97c9d88298f5ea14c65937897ca61affe3 # Parent 9f2112ba604936f755fbcbb2127d30c56cc5be33 Handle dest failing to open properly by closing the src handle. Thanks to Adam Petaccia for pointing this out. diff -r 9f2112ba6049 -r 03525f97c9d8 pidgin/gtkprefs.c --- a/pidgin/gtkprefs.c Sun Jun 28 19:14:03 2009 +0000 +++ b/pidgin/gtkprefs.c Sun Jun 28 21:50:14 2009 +0000 @@ -650,8 +650,10 @@ if(!(src = g_fopen(source, "rb"))) return FALSE; - if(!(dest = g_fopen(destination, "wb"))) + if(!(dest = g_fopen(destination, "wb"))) { + fclose(src); return FALSE; + } while((chr = fgetc(src)) != EOF) { fputc(chr, dest);