scsi: qedf: Add missing skb frees in error path
authorChad Dupuis <chad.dupuis@cavium.com>
Wed, 25 Apr 2018 13:08:47 +0000 (06:08 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 May 2018 04:57:09 +0000 (00:57 -0400)
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_fip.c
drivers/scsi/qedf/qedf_main.c

index 773558f..aef199c 100644 (file)
@@ -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;
                }
 
index e14b402..8dcacc5 100644 (file)
@@ -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;
        }