浏览代码

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>
Subash Abhinov Kasiviswanathan 7 年之前
父节点
当前提交
6296928fa3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c

+ 1 - 0
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;
 }