broadband-modem-mbim: plug memleak when processing USSD in GSM7

This commit is contained in:
Aleksander Morgado
2020-12-19 11:10:44 +01:00
parent 7f88280929
commit 0729ba5c88
+2 -2
View File
@@ -4812,8 +4812,8 @@ ussd_decode (guint32 scheme,
gchar *decoded = NULL;
if (scheme == MM_MODEM_GSM_USSD_SCHEME_7BIT) {
guint8 *unpacked;
guint32 unpacked_len;
g_autofree guint8 *unpacked = NULL;
guint32 unpacked_len;
unpacked = mm_charset_gsm_unpack ((const guint8 *)data->data, (data->len * 8) / 7, 0, &unpacked_len);
decoded = (gchar *) mm_charset_gsm_unpacked_to_utf8 (unpacked, unpacked_len);