diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-27 07:06:18 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-27 07:06:18 +0000 |
commit | 6d46ef5c157b87f6a44e009b4fc7f60078ecce59 (patch) | |
tree | 29c488db9daf4fb7d26d8e56c69e6f5cc6b9b246 /src | |
parent | f6ae755743b4ca15509098a5374e93f7450770e4 (diff) |
fixed fp and memory leaks.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3300 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/jpilot.c | 3 | ||||
-rw-r--r-- | src/template.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/jpilot.c b/src/jpilot.c index e0161cc1..ca8e391b 100644 --- a/src/jpilot.c +++ b/src/jpilot.c @@ -849,6 +849,7 @@ static gint jpilot_read_db_files( JPilotFile *pilotFile, GList **records ) { return MGU_ERROR_READ; } if (feof(in)) { + fclose(in); return MGU_EOF; } } @@ -866,6 +867,8 @@ static gint jpilot_read_db_files( JPilotFile *pilotFile, GList **records ) { break; } if (feof(in)) { + free_mem_rec_header(&mem_rh); + fclose(in); return MGU_EOF; } } 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); |