提交 02ee9b18 编写于 作者: W Wei Yongjun 提交者: David S. Miller

qed: Fix possible memory leak in qed_dcbnl_get_ieee_pfc()

'dcbx_info is malloced in qed_dcbnl_get_ieee_pfc() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: a1d8d8a5 ("qed: Add dcbnl support.")
Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2fb876b2
......@@ -1855,6 +1855,7 @@ static int qed_dcbnl_get_ieee_pfc(struct qed_dev *cdev,
if (!dcbx_info->operational.ieee) {
DP_INFO(hwfn, "DCBX is not enabled/operational in IEEE mode\n");
kfree(dcbx_info);
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册