summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-02-10 23:26:49 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-02-10 23:26:49 +0100
commit307e2bb26f8603cc08ff514f69a10478b56dc597 (patch)
tree52c2cb3f7ae5b4e6041050c5300d8db9e52f59ef
parenta80fc06d1885e1512101914ac0282d8d15bc4843 (diff)
qmi-firmware-update: plug memleak
==14200== 52 bytes in 1 blocks are definitely lost in loss record 792 of 1,191 ==14200== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14200== by 0x5D34B98: g_malloc (in /usr/lib/libglib-2.0.so.0.5000.2) ==14200== by 0x5D4EC3E: g_strdup (in /usr/lib/libglib-2.0.so.0.5000.2) ==14200== by 0x40C16D: udev_helper_get_udev_device_details (qfu-udev-helpers.c:94) ==14200== by 0x40C72C: udev_helper_find_by_device_info_in_subsystem (qfu-udev-helpers.c:263) ==14200== by 0x40C978: qfu_udev_helper_find_by_device_info (qfu-udev-helpers.c:314) ==14200== by 0x4076A9: qfu_device_selection_new (qfu-device-selection.c:264) ==14200== by 0x406A99: main (qfu-main.c:559)
-rw-r--r--src/qmi-firmware-update/qfu-udev-helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmi-firmware-update/qfu-udev-helpers.c b/src/qmi-firmware-update/qfu-udev-helpers.c
index 3402cc5..d1eb5df 100644
--- a/src/qmi-firmware-update/qfu-udev-helpers.c
+++ b/src/qmi-firmware-update/qfu-udev-helpers.c
@@ -296,7 +296,7 @@ qfu_udev_helper_find_by_device_info (guint16 vid,
GString *match_str;
gchar *sysfs_path = NULL;
- sysfs_paths = g_ptr_array_new ();
+ sysfs_paths = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
udev = g_udev_client_new (NULL);
match_str = g_string_new ("");