Revision 3300 libsylph/procmsg.c

View differences:

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);

Also available in: Unified diff