aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-06-02 03:27:44 +0800
committerMilan Crha <mcrha@redhat.com>2009-06-02 03:27:44 +0800
commit69a1e923a71ee881721e21b991de08b897f9e7b0 (patch)
treea513b244d65261f4c5c423479ea6ae4e5214c3d3
parent8079db6e4695e37c2b7777e61d6e657e7eadc564 (diff)
downloadgsoc2013-evolution-69a1e923a71ee881721e21b991de08b897f9e7b0.tar.gz
gsoc2013-evolution-69a1e923a71ee881721e21b991de08b897f9e7b0.tar.zst
gsoc2013-evolution-69a1e923a71ee881721e21b991de08b897f9e7b0.zip
Part of bug #574940 - Do not use freed memory in EMFolderView/Browser
-rw-r--r--mail/em-folder-browser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 3c2d223307..50add07fb7 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -1939,8 +1939,12 @@ emfb_gui_folder_changed(CamelFolder *folder, gpointer dummy, EMFolderBrowser *em
mi = camel_folder_get_message_info(emfb->view.folder, emfb->priv->select_uid);
if (mi) {
+ /* because some sub-functions might free the pointer before it's done here */
+ gchar *uid = g_strdup (emfb->priv->select_uid);
+
camel_folder_free_message_info(emfb->view.folder, mi);
- em_folder_view_set_message(&emfb->view, emfb->priv->select_uid, FALSE);
+ em_folder_view_set_message (&emfb->view, uid, FALSE);
+ g_free (uid);
g_free (emfb->priv->select_uid);
emfb->priv->select_uid = NULL;
}