mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 22:42:37 +01:00
wiphy: Fix memory leak
This happens when connecting / disconnecting successfully multiple times. ==4336== 64 bytes in 2 blocks are definitely lost in loss record 9 of 11 ==4336== at 0x4C2B970: malloc (vg_replace_malloc.c:296) ==4336== by 0x40CEED: l_malloc (util.c:62) ==4336== by 0x40D6D9: l_util_from_hexstring (util.c:493) ==4336== by 0x4049C6: network_connect_psk (wiphy.c:315) ==4336== by 0x4049C6: network_connect (wiphy.c:359) ==4336== by 0x41D7EE: _dbus_object_tree_dispatch (dbus-service.c:845) ==4336== by 0x416A16: message_read_handler (dbus.c:297) ==4336== by 0x411984: io_callback (io.c:120) ==4336== by 0x410FC2: l_main_run (main.c:346) ==4336== by 0x40253E: main (main.c:171)
This commit is contained in:
parent
5137d8b855
commit
341b69ce7c
@ -312,6 +312,8 @@ static struct l_dbus_message *network_connect_psk(struct network *network,
|
|||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
l_debug("psk: %s", psk);
|
l_debug("psk: %s", psk);
|
||||||
|
|
||||||
|
l_free(network->psk);
|
||||||
network->psk = l_util_from_hexstring(psk, &len);
|
network->psk = l_util_from_hexstring(psk, &len);
|
||||||
|
|
||||||
l_debug("len: %zd", len);
|
l_debug("len: %zd", len);
|
||||||
|
Loading…
Reference in New Issue
Block a user