Skip to content

Commit

Permalink
net: qualcomm: rmnet: Fix leak in device creation failure
Browse files Browse the repository at this point in the history
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: ceed73a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
Signed-off-by: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Subash Abhinov Kasiviswanathan authored and davem330 committed Dec 5, 2017
1 parent c20a548 commit 6296928
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6296928

Please sign in to comment.