From b0f1767b06c8975b1b7871d74959afbca4235698 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Mon, 6 Jul 2009 15:11:52 +0300 Subject: [PATCH] Fix crash when trying to free dialog Another crash observed when the other side closed the dialog. --- src/sipe.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sipe.c b/src/sipe.c index a5f71723..f3746eea 100755 --- a/src/sipe.c +++ b/src/sipe.c @@ -2544,8 +2544,12 @@ static struct sip_im_session * find_or_create_im_session (struct sipe_account_da static void free_dialog(struct sip_dialog *dialog) { - GSList *entry = dialog->routes; + GSList *entry; + + if (!dialog) return; + g_free(dialog->with); + entry = dialog->routes; while (entry) { g_free(entry->data); entry = g_slist_remove(entry, entry->data); -- 2.11.4.GIT