Skip to content
Snippets Groups Projects
Commit b9cabe52 authored by Jesper Juhl's avatar Jesper Juhl Committed by David S. Miller
Browse files

ieee802154: Don't leak memory in ieee802154_nl_fill_phy


In net/ieee802154/nl-phy.c::ieee802154_nl_fill_phy() I see two small
issues.
1) If the allocation of 'buf' fails we may just as well return -EMSGSIZE
   directly rather than jumping to 'out:' and do a pointless kfree(0).
2) We do not free 'buf' unless we jump to one of the error labels and this
   leaks memory.
This patch should address both.

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Acked-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@conan.davemloft.net>
parent 84860c72
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment