summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-03-16 10:09:56 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-03-16 11:58:04 +0100
commit9aaa09a29edd1d29313a5efffa0f94ef6bafa1ca (patch)
tree1f6035b59965aa0aebad5a6dc35ec56547e023d8
parent3c25d9fe60fb0a71092280708fd74647bd7edfbf (diff)
libqmi-glib,message: fix GSM7 fallback and memleak
The out pointer was being incorrectly re-set to the original contents even if we had attempted the GSM7 or UCS2 fallbacks. (cherry picked from commit 59ce5fdc3b6b124c1ff6faed60a836e8f388d653)
-rw-r--r--src/libqmi-glib/qmi-message.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libqmi-glib/qmi-message.c b/src/libqmi-glib/qmi-message.c
index 0602f91..ca5756d 100644
--- a/src/libqmi-glib/qmi-message.c
+++ b/src/libqmi-glib/qmi-message.c
@@ -1343,10 +1343,6 @@ qmi_message_tlv_read_string (QmiMessage *self,
}
}
- *out = g_malloc (valid_string_length + 1);
- memcpy (*out, ptr, valid_string_length);
- (*out)[valid_string_length] = '\0';
-
*offset = (*offset + string_length);
return TRUE;
}