'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: a1d8d8a51e83 ("qed: Add dcbnl support.")
Signed-off-by: Wei Yongjun <redacted>
---
drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 1 +
1 file changed, 1 insertion(+)
@@ -1968,6 +1968,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;}
@@ -1968,6 +1968,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;}
Thanks for the patch.
Acked-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Please do not quote patches like this, and top-post your Ack.
Please instead use canonical quoting, with some kind of delimiter
in the first column of the quoted material.
Unless you have specific comments for specific parts of the change
itself, do not quote the patch, just quoting the commit message itself
is sufficient.
And finally, put your ACK and any other part of your response, after
the quoted material rather than before.
The way you have ACK'd this patch, patchwork will not see it and
instead thinks this is a fresh new patch posting. So your ACK will
get possibly lost, and I will definitely have more work to do weeding
out this extraneous patch entry in patchwork.
Thank you.
'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: a1d8d8a51e83 ("qed: Add dcbnl support.")
Signed-off-by: Wei Yongjun <redacted>