[SCSI] libfcoe, fcoe: libfcoe NPIV support
[linux-2.6-block.git] / drivers / scsi / libfc / fc_elsct.c
index 5cfa68732e9d7dd8a0da7aaa9e8aad1c4aa7e2a1..aae54fe3b2999900d4695046c143847f2b5c0baa 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * fc_elsct_send - sends ELS/CT frame
  */
-static struct fc_seq *fc_elsct_send(struct fc_lport *lport,
+struct fc_seq *fc_elsct_send(struct fc_lport *lport,
                                    u32 did,
                                    struct fc_frame *fp,
                                    unsigned int op,
@@ -53,14 +53,17 @@ static struct fc_seq *fc_elsct_send(struct fc_lport *lport,
                did = FC_FID_DIR_SERV;
        }
 
-       if (rc)
+       if (rc) {
+               fc_frame_free(fp);
                return NULL;
+       }
 
        fc_fill_fc_hdr(fp, r_ctl, did, fc_host_port_id(lport->host), fh_type,
                       FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0);
 
        return lport->tt.exch_seq_send(lport, fp, resp, NULL, arg, timer_msec);
 }
+EXPORT_SYMBOL(fc_elsct_send);
 
 int fc_elsct_init(struct fc_lport *lport)
 {