comparison src/gtkconv.c @ 13405:851dd370e0fe

[gaim-migrate @ 15780] Close the file handle if we can't find the data we wanted to write to it. Fixes CID 48 committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 06 Mar 2006 19:42:12 +0000
parents b0dd97098699
children 7d1ebac854ba
comparison
equal deleted inserted replaced
13404:c74401cfef23 13405:851dd370e0fe
2381 icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); 2381 icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv));
2382 data = gaim_buddy_icon_get_data(icon, &len); 2382 data = gaim_buddy_icon_get_data(icon, &len);
2383 2383
2384 if ((len <= 0) || (data == NULL)) { 2384 if ((len <= 0) || (data == NULL)) {
2385 gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); 2385 gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL);
2386 fclose(fp);
2386 return; 2387 return;
2387 } 2388 }
2388 2389
2389 fwrite(data, 1, len, fp); 2390 fwrite(data, 1, len, fp);
2390 fclose(fp); 2391 fclose(fp);