Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2da049bd authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Greg Kroah-Hartman
Browse files

staging: gdm72xx: fix an skb memory leak



The NLMSG_PUT() macro contains a hidden goto that jumps to the
nlmsg_failure label. Since the sk_buff was allocated before the macro,
jumping to the nlmsg_failure label leaks the memory allocated for it.

Calling kfree() before returning would fix it, but is better to avoid
using this error prone macro and use nlmsg_put() instead.

Also, use nlmsg_data() instead of NLMSG_DATA() to check type.

Signed-off-by: default avatarJavier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8abca1f
Loading
Loading
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