mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
netdev: Fix memory leak
==24934== 16 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==24934== at 0x4C2C970: malloc (vg_replace_malloc.c:296) ==24934== by 0x41675D: l_malloc (util.c:62) ==24934== by 0x4033B3: netdev_set_linkmode_and_operstate (netdev.c:149) ==24934== by 0x4042B9: netdev_free (netdev.c:221) ==24934== by 0x41735D: l_queue_clear (queue.c:107) ==24934== by 0x4173A8: l_queue_destroy (queue.c:82) ==24934== by 0x40543D: netdev_exit (netdev.c:1459) ==24934== by 0x402D6F: nl80211_vanished (main.c:126) ==24934== by 0x41E607: l_genl_family_unref (genl.c:1057) ==24934== by 0x402B50: main (main.c:237)
This commit is contained in:
parent
63878a84c1
commit
830af391e2
@ -107,8 +107,6 @@ static void netlink_result(int error, uint16_t type, const void *data,
|
||||
return;
|
||||
|
||||
cb_data->callback(error < 0 ? false : true, cb_data->user_data);
|
||||
|
||||
l_free(cb_data);
|
||||
}
|
||||
|
||||
static size_t rta_add_u8(void *rta_buf, unsigned short type, uint8_t value)
|
||||
@ -153,7 +151,7 @@ static void netdev_set_linkmode_and_operstate(uint32_t ifindex,
|
||||
|
||||
l_netlink_send(rtnl, RTM_SETLINK, 0, rtmmsg,
|
||||
rta_buf - (void *) rtmmsg,
|
||||
netlink_result, cb_data, NULL);
|
||||
netlink_result, cb_data, l_free);
|
||||
|
||||
l_free(rtmmsg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user