Message ID | 20191206100831.21124-3-po-hsu.lin@canonical.com |
---|---|
State | New |
Headers | show |
Series | [D,E,F,CVE-2019-19062,SRU,1/1] crypto: user - fix memory leak in crypto_report | expand |
diff --git a/crypto/crypto_user_base.c b/crypto/crypto_user_base.c index c65e390..a4db718 100644 --- a/crypto/crypto_user_base.c +++ b/crypto/crypto_user_base.c @@ -214,8 +214,10 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, drop_alg: crypto_mod_put(alg); - if (err) + if (err) { + kfree_skb(skb); return err; + } return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid); }