Commit 3ce761e3 authored by Mikael Magnusson's avatar Mikael Magnusson

gfig: close file on parse errors

parent 68a4c4f8
......@@ -447,6 +447,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;
}
......@@ -467,6 +468,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;
}
......@@ -475,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;
}
......@@ -491,6 +494,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment