ussd: plug a leak

This commit is contained in:
Aleksander Morgado
2012-01-23 15:31:58 +01:00
parent a86a5c39ac
commit 62e94727fe

View File

@@ -5326,6 +5326,7 @@ decode_ussd_response (MMGenericGsm *self,
char **items, **iter, *p; char **items, **iter, *p;
char *str = NULL; char *str = NULL;
gint encoding = -1; gint encoding = -1;
char *decoded;
/* Look for the first ',' */ /* Look for the first ',' */
p = strchr (reply, ','); p = strchr (reply, ',');
@@ -5352,8 +5353,9 @@ decode_ussd_response (MMGenericGsm *self,
if (p) if (p)
*p = '\0'; *p = '\0';
return mm_modem_gsm_ussd_decode (MM_MODEM_GSM_USSD (self), str, decoded = mm_modem_gsm_ussd_decode (MM_MODEM_GSM_USSD (self), str, cur_charset);
cur_charset); g_strfreev (items);
return decoded;
} }
static char* static char*