[gimp/gimp-2-8] gfig: close file on parse errors
- From: Mikael Magnusson <mikachu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] gfig: close file on parse errors
- Date: Fri, 31 Oct 2014 03:12:00 +0000 (UTC)
commit 6189fa98489c6965c6ba8cc5ef2454176651663b
Author: Mikael Magnusson <mikachu src gnome org>
Date: Wed Oct 29 21:16:31 2014 +0100
gfig: close file on parse errors
(cherry picked from commit 3ce761e3b30f5195ba2f2e0ffa4b16a742b10d69)
plug-ins/gfig/gfig.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/gfig/gfig.c b/plug-ins/gfig/gfig.c
index 23088e9..c9aa6c8 100644
--- a/plug-ins/gfig/gfig.c
+++ b/plug-ins/gfig/gfig.c
@@ -456,6 +456,7 @@ gfig_load (const gchar *filename,
g_message ("File '%s' is not a gfig file",
gimp_filename_to_utf8 (gfig->filename));
gfig_free (gfig);
+ fclose (fp);
return NULL;
}
@@ -476,6 +477,7 @@ gfig_load (const gchar *filename,
g_message ("File '%s' corrupt file - Line %d Option section incorrect",
gimp_filename_to_utf8 (filename), line_no);
gfig_free (gfig);
+ fclose (fp);
return NULL;
}
@@ -484,6 +486,7 @@ gfig_load (const gchar *filename,
g_message ("File '%s' corrupt file - Line %d Option section incorrect",
gimp_filename_to_utf8 (filename), line_no);
gfig_free (gfig);
+ fclose (fp);
return NULL;
}
@@ -500,6 +503,7 @@ gfig_load (const gchar *filename,
g_message ("File '%s' corrupt file - Line %d Object count to small",
gimp_filename_to_utf8 (filename), line_no);
gfig_free (gfig);
+ fclose (fp);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]