[PATCH] libmbim-glib: Fix a memory leak in unitttest
Yunlian Jiang
yunlian at chromium.org
Mon Jul 21 17:29:07 PDT 2014
Original bug entry is at
https://code.google.com/p/chromium/issues/detail?id=394412&q=libmbim&colspec=ID%20Pri%20M%20Iteration%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified
In the unittest, it fails to free |provider_id|
diff --git a/src/libmbim-glib/test/test-message-parser.c
b/src/libmbim-glib/test/test-message-parser.c
index d25374c..470bde6 100644
--- a/src/libmbim-glib/test/test-message-parser.c
+++ b/src/libmbim-glib/test/test-message-parser.c
@@ -653,6 +653,7 @@ test_message_parser_basic_connect_register_state (void)
MBIM_DATA_CLASS_HSUPA));
g_assert_cmpuint (current_cellular_class, ==, MBIM_CELLULAR_CLASS_GSM);
g_assert_cmpstr (provider_id, ==, "26006");
+ g_free(provider_id);
g_assert (provider_name == NULL);
g_assert (roaming_text == NULL);
g_assert_cmpuint (registration_flag, ==,
MBIM_REGISTRATION_FLAG_PACKET_SERVICE_AUTOMATIC_ATTACH);
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20140721/9784b65c/attachment.html>
More information about the libmbim-devel
mailing list