Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02ee9b18 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

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: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2fb876b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}