mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()
[ Upstream commit 40752b3eae
]
This patch fixes potential double frees if register_hdlc_device() fails.
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Reviewed-by: Peng Hao <peng.hao2@zte.com.cn>
CC: Zhao Qiang <qiang.zhao@nxp.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
CC: linuxppc-dev@lists.ozlabs.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e3a5ee1382
commit
df427cac84
1 changed files with 0 additions and 1 deletions
|
@ -1113,7 +1113,6 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
|
|||
if (register_hdlc_device(dev)) {
|
||||
ret = -ENOBUFS;
|
||||
pr_err("ucc_hdlc: unable to register hdlc device\n");
|
||||
free_netdev(dev);
|
||||
goto free_dev;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue