aboutsummaryrefslogtreecommitdiff
path: root/src/template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/template.c')
-rw-r--r--src/template.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/template.c b/src/template.c
index e121bd3b..3e8781fd 100644
--- a/src/template.c
+++ b/src/template.c
@@ -73,6 +73,7 @@ static Template *template_load(gchar *filename, guint tmplid)
if (!tmpl->name) {
g_warning("wrong template format\n");
template_free(tmpl);
+ fclose(fp);
return NULL;
}
@@ -80,6 +81,7 @@ static Template *template_load(gchar *filename, guint tmplid)
if (!tmpl->value) {
g_warning("cannot read template body\n");
template_free(tmpl);
+ fclose(fp);
return NULL;
}
fclose(fp);