summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2011-01-17 19:05:16 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-01-17 18:15:42 +0100
commit37ae4832de078f72e209266138feb808fa766bc2 (patch)
tree232f92713e98e907fd1390e49eb04e11cdded512 /drivers
parent2b8a35860173f8f4570dc2631c2ce873b68466c1 (diff)
downloadofono-37ae4832de078f72e209266138feb808fa766bc2.tar.bz2
Fix crash in isimodem call forwarding.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isimodem/call-forwarding.c13
1 files 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;