Revision 3254 src/messageview.c

View differences:

messageview.c
597 597
		if (!messageview->msginfo)
598 598
			messageview->msginfo = procmsg_msginfo_copy(msginfo);
599 599
	}
600
	procmime_mimeinfo_free_all(messageview->mimeinfo);
601
	messageview->mimeinfo = mimeinfo;
602
	g_free(messageview->file);
603
	messageview->file = file;
600 604

  
601 605
	if (messageview->window && msginfo->subject) {
602 606
		gchar *title;
......
619 623
	} else {
620 624
		messageview_change_view_type(messageview, MVIEW_TEXT);
621 625
		textview_show_message(messageview->textview, mimeinfo, file);
622
		procmime_mimeinfo_free_all(mimeinfo);
623 626
	}
624 627

  
625 628
	if (messageview->new_window)
......
628 631
	syl_plugin_signal_emit("messageview-show", messageview, msginfo,
629 632
			       all_headers);
630 633

  
631
	g_free(file);
632

  
633 634
	return 0;
634 635
}
635 636

  
......
780 781
void messageview_clear(MessageView *messageview)
781 782
{
782 783
	messageview_set_tool_menu(messageview, NULL);
784
	g_free(messageview->file);
785
	messageview->file = NULL;
786
	procmime_mimeinfo_free_all(messageview->mimeinfo);
787
	messageview->mimeinfo = NULL;
783 788
	procmsg_msginfo_free(messageview->msginfo);
784 789
	messageview->msginfo = NULL;
785 790
	messageview_change_view_type(messageview, MVIEW_TEXT);

Also available in: Unified diff