Revision 3300

View differences:

libsylph/procmsg.c
2018 2018

  
2019 2019
		g_free(cur_id);
2020 2020
skip:
2021
		procmime_mimeinfo_free_all(mimeinfo);
2021 2022
		fclose(fp);
2022
		procmime_mimeinfo_free_all(mimeinfo);
2023 2023
	}
2024 2024

  
2025 2025
	if (!part_id) {
......
2094 2094
		out_size = get_left_file_size(fp);
2095 2095
		if (out_size < 0) {
2096 2096
			g_warning("cannot tell left file size of part %d\n", i + 1);
2097
			procmime_mimeinfo_free_all(mimeinfo);
2098
			fclose(fp);
2097 2099
			fclose(tmp_fp);
2098 2100
			g_unlink(file);
2099 2101
			return -1;
......
2101 2103
		empty_line_size = get_last_empty_line_size(fp, out_size);
2102 2104
		if (empty_line_size < 0) {
2103 2105
			g_warning("cannot get last empty line size of part %d\n", i + 1);
2106
			procmime_mimeinfo_free_all(mimeinfo);
2107
			fclose(fp);
2104 2108
			fclose(tmp_fp);
2105 2109
			g_unlink(file);
2106 2110
			return -1;
......
2109 2113
		if (append_file_part(fp, ftell(fp), out_size - empty_line_size,
2110 2114
				     tmp_fp) < 0) {
2111 2115
			g_warning("write failed\n");
2116
			procmime_mimeinfo_free_all(mimeinfo);
2117
			fclose(fp);
2112 2118
			fclose(tmp_fp);
2113 2119
			g_unlink(file);
2114 2120
			return -1;
2115 2121
		}
2116 2122

  
2123
		procmime_mimeinfo_free_all(mimeinfo);
2117 2124
		fclose(fp);
2118
		procmime_mimeinfo_free_all(mimeinfo);
2119 2125
	}
2120 2126

  
2121 2127
	fclose(tmp_fp);
libsylph/procmime.c
1722 1722
		list = g_list_append(list, mailcap);
1723 1723
	}
1724 1724

  
1725
	fclose(fp);
1726

  
1725 1727
	return list;
1726 1728
}
1727 1729

  
src/template.c
73 73
	if (!tmpl->name) {
74 74
		g_warning("wrong template format\n");
75 75
		template_free(tmpl);
76
		fclose(fp);
76 77
		return NULL;
77 78
	}
78 79

  
......
80 81
	if (!tmpl->value) {
81 82
		g_warning("cannot read template body\n");
82 83
		template_free(tmpl);
84
		fclose(fp);
83 85
		return NULL;
84 86
	}
85 87
	fclose(fp);
src/jpilot.c
849 849
			return MGU_ERROR_READ;
850 850
		}
851 851
		if (feof(in)) {
852
			fclose(in);
852 853
			return MGU_EOF;
853 854
		}
854 855
	}
......
866 867
				break;
867 868
			}
868 869
			if (feof(in)) {
870
				free_mem_rec_header(&mem_rh);
871
				fclose(in);
869 872
				return MGU_EOF;
870 873
			}
871 874
		}
plugin/attachment_tool/attachment_tool.c
211 211
	if ((outfp = g_fopen(outfile, "wb")) == NULL) {
212 212
		g_free(outfile);
213 213
		g_free(infile);
214
		fclose(fp);
214 215
		procmime_mimeinfo_free_all(mimeinfo);
215 216
		return FALSE;
216 217
	}
ChangeLog
1
2013-11-27
2

  
3
	* src/template.c: template_load(): fixed fp leak on error.
4
	* plugin/attachment_tool/attachment_tool.c: remove_attachment():
5
	  fixed fp leak on error.
6
	* libsylph/procmsg.c: procmsg_concat_partial_messages(): fixed fp
7
	  leaks on error.
8
	* libsylph/procmime.c: procmime_parse_mailcap(): fixed fp leak.
9
	* src/jpilot.c: jpilot_read_db_files(): fixed fp leak and memory leaks.
10

  
1 11
2013-11-26
2 12

  
3 13
	* src/headerview.c: headerview_show_xface(): make sure xface is nul

Also available in: Unified diff