ethtool: fix a memory leak in ethnl_default_start()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 8 Jan 2020 05:39:48 +0000 (08:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Jan 2020 00:03:35 +0000 (16:03 -0800)
commita6dd04807ce4d7b71920d996e6b84fa3733a1bfd
tree346e3f8e74ce2e868ea5ae0b317512a26cb347af
parent78b6d073bc0101f9147845ba868d9d2e6189f990
ethtool: fix a memory leak in ethnl_default_start()

If ethnl_default_parse() fails then we need to free a couple
memory allocations before returning.

Fixes: 728480f12442 ("ethtool: default handlers for GET requests")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/netlink.c