From 37ae4832de078f72e209266138feb808fa766bc2 Mon Sep 17 00:00:00 2001 From: Pekka Pessi Date: Mon, 17 Jan 2011 19:05:16 +0200 Subject: [PATCH] Fix crash in isimodem call forwarding. --- drivers/isimodem/call-forwarding.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/isimodem/call-forwarding.c b/drivers/isimodem/call-forwarding.c index 2fafb267..89a03dcb 100644 --- a/drivers/isimodem/call-forwarding.c +++ b/drivers/isimodem/call-forwarding.c @@ -143,6 +143,14 @@ static gboolean decode_gsm_forwarding_info(GIsiSubBlockIter *parent, info->numlen * 2, 2 + len)) return FALSE; + + if (number) + *number = tag; + else + g_free(tag); + } else { + if (number) + *number = g_strdup(""); } if (status) @@ -154,11 +162,6 @@ static gboolean decode_gsm_forwarding_info(GIsiSubBlockIter *parent, if (noreply) *noreply = info->noreply; - if (number) - *number = tag; - else - g_free(tag); - return TRUE; } return FALSE;