Message ID | 1512506478-9113-3-git-send-email-subashab@codeaurora.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Series | net: qualcomm: rmnet: Fix leaks in failure scenarios | expand |
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c index 71bee1a..df21e90 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c @@ -195,6 +195,7 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev, err1: rmnet_unregister_real_device(real_dev, port); err0: + kfree(ep); return err; }
If the rmnet device creation fails in the newlink either while registering with the physical device or after subsequent operations, the rmnet endpoint information is never freed. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 1 + 1 file changed, 1 insertion(+)