diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-26 09:06:38 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-26 09:06:38 +0000 |
commit | f6ae755743b4ca15509098a5374e93f7450770e4 (patch) | |
tree | 20aee37ec80e71206af3a75cf1f39ea6235e01d5 | |
parent | add2919b7ba3c008b188998af8612502a6f796ff (diff) |
fixed resource/memory leaks.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3299 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/jpilot.c | 2 | ||||
-rw-r--r-- | src/rfc2015.c | 2 |
3 files changed, 7 insertions, 0 deletions
@@ -2,6 +2,9 @@ * src/headerview.c: headerview_show_xface(): make sure xface is nul terminated. + * src/rfc2015.c: rfc2015_msg_is_encrypted(): fixed fp resource leak. + (unused function) + * src/jpilot.c: jpilot_read_db_files(): fixed memory leaks. 2013-11-25 diff --git a/src/jpilot.c b/src/jpilot.c index d3491706..e0161cc1 100644 --- a/src/jpilot.c +++ b/src/jpilot.c @@ -934,6 +934,7 @@ static gint jpilot_read_db_files( JPilotFile *pilotFile, GList **records ) { temp_br = malloc(sizeof(buf_rec)); if (!temp_br) { + free(buf); break; } temp_br->rt = PALM_REC; @@ -990,6 +991,7 @@ static gint jpilot_read_db_files( JPilotFile *pilotFile, GList **records ) { } } } + free(temp_br); } fclose(pc_in); diff --git a/src/rfc2015.c b/src/rfc2015.c index 432580e7..b715c4bc 100644 --- a/src/rfc2015.c +++ b/src/rfc2015.c @@ -565,6 +565,8 @@ gboolean rfc2015_msg_is_encrypted(const gchar *file) ret = rfc2015_is_encrypted(mimeinfo); procmime_mimeinfo_free_all(mimeinfo); + fclose(fp); + return ret != 0 ? TRUE : FALSE; } |