summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedf
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@cavium.com>2018-04-25 06:08:47 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-08 00:57:09 -0400
commitf32803bb4512c73711a996e3e8e3188abeb8445e (patch)
tree485dc182ab9966b47ef183eec1c99ba9ff82001a /drivers/scsi/qedf
parentc3ef86f3ec581b370d3fed5f5efbd52c2f489985 (diff)
scsi: qedf: Add missing skb frees in error path
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf')
-rw-r--r--drivers/scsi/qedf/qedf_fip.c1
-rw-r--r--drivers/scsi/qedf/qedf_main.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf_fip.c b/drivers/scsi/qedf/qedf_fip.c
index 773558fc0697..aef199c12fb4 100644
--- a/drivers/scsi/qedf/qedf_fip.c
+++ b/drivers/scsi/qedf/qedf_fip.c
@@ -181,6 +181,7 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb)
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
"Dropping CVL since FCF has not been selected "
"yet.");
+ kfree_skb(skb);
return;
}
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index e14b402f25d5..8dcacc5b5f60 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2190,6 +2190,7 @@ static void qedf_recv_frame(struct qedf_ctx *qedf,
if (ntoh24(&dest_mac[3]) != ntoh24(fh->fh_d_id)) {
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2,
"FC frame d_id mismatch with MAC %pM.\n", dest_mac);
+ kfree_skb(skb);
return;
}