summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2017-12-05 13:41:18 -0700
committerDavid S. Miller <davem@davemloft.net>2017-12-05 18:03:54 -0500
commit6296928fa3b9f656d7760fbf346c0cf834788a78 (patch)
tree29a1de2d109d93edd9a65a0a9c084a266a17b534
parentc20a548792f15f8d8e38cd74356301c6db0d241f (diff)
downloadlinux-6296928fa3b9f656d7760fbf346c0cf834788a78.tar.gz
linux-6296928fa3b9f656d7760fbf346c0cf834788a78.tar.bz2
linux-6296928fa3b9f656d7760fbf346c0cf834788a78.zip
net: qualcomm: rmnet: Fix leak in device creation failure
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index 71bee1af71ef..df21e900f874 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -195,6 +195,7 @@ err2:
err1:
rmnet_unregister_real_device(real_dev, port);
err0:
+ kfree(ep);
return err;
}