diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-06-12 06:28:16 +0200 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-14 00:03:22 +0200 |
commit | b9cabe52c27cf834137f3aaa46da23bcf32284e8 (patch) | |
tree | c620f63c1314e08f50033de489ea39ef92538b9c /fs | |
parent | ISDN, hfcsusb: Don't leak in hfcsusb_ph_info() (diff) | |
download | linux-b9cabe52c27cf834137f3aaa46da23bcf32284e8.tar.xz linux-b9cabe52c27cf834137f3aaa46da23bcf32284e8.zip |
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: Jesper Juhl <jj@chaosbits.net>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions