Message ID | 20200707102431.178675-1-jingxiangfeng@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | scsi: fcoe: add missed kfree() in an error path | expand |
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 25dae9f0b205..976f70cbe043 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -830,6 +830,7 @@ static void fcoe_fdmi_info(struct fc_lport *lport, struct net_device *netdev) if (rc) { printk(KERN_INFO "fcoe: Failed to retrieve FDMI " "information from netdev.\n"); + kfree(fdmi); return; }
fcoe_fdmi_info() misses to call kfree() in an error path. Add the missed function call to fix it. Fixes: f07d46bbc9ba ("fcoe: Fix smatch warning in fcoe_fdmi_info function") Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> --- drivers/scsi/fcoe/fcoe.c | 1 + 1 file changed, 1 insertion(+)