Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH] vpn: Fix memory leak (Slava Monich)
----------------------------------------------------------------------
Message: 1
Date: Tue, 14 Aug 2018 23:16:04 +0300
From: Slava Monich <[email protected]>
To: [email protected]
Subject: [PATCH] vpn: Fix memory leak
Message-ID: <[email protected]>
==10939== 20 bytes in 4 blocks are definitely lost in loss record 199 of 429
==10939== at 0x483F3EC: malloc (vg_replace_malloc.c)
==10939== by 0x4C7E35F: g_malloc (gmem.c)
==10939== by 0x4C962BD: g_strdup (gstrfuncs.c)
==10939== by 0x1945B: vpn_create_tun (vpn.c)
==10939== by 0x19C83: vpn_connect (vpn.c)
==10939== by 0x292DF: __vpn_provider_connect (vpn-provider.c)
==10939== by 0x27797: do_connect (vpn-provider.c)
==10939== by 0x46853: process_message (object.c)
==10939== by 0x486AB: generic_message (object.c)
==10939== by 0x49BDFE1: _dbus_object_tree_dispatch_and_unlock
(dbus-object-tree.c)
==10939== by 0x49B4071: dbus_connection_dispatch (dbus-connection.c)
==10939== by 0x43A8B: message_dispatch (mainloop.c)
---
vpn/plugins/vpn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
index 10548aa..a26bcc6 100644
--- a/vpn/plugins/vpn.c
+++ b/vpn/plugins/vpn.c
@@ -378,6 +378,7 @@ static int vpn_create_tun(struct vpn_provider *provider,
int flags)
}
data->tun_flags = flags;
+ g_free(data->if_name);
data->if_name = (char *)g_strdup(ifr.ifr_name);
if (!data->if_name) {
connman_error("Failed to allocate memory");
--
1.9.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 34, Issue 6
**************************************