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

Commit 72e0daad authored by Hillf Danton's avatar Hillf Danton Committed by James Bottomley
Browse files

[SCSI] libfc: fix memory leakage in local port



There seems info should get freed when error encountered.

Signed-off-by: default avatarHillf Danton <dhillf@gmail.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 2d6dfb00
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -1703,8 +1703,10 @@ static int fc_lport_els_request(struct fc_bsg_job *job,
	info->sg = job->reply_payload.sg_list;
	info->sg = job->reply_payload.sg_list;


	if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp,
	if (!lport->tt.exch_seq_send(lport, fp, fc_lport_bsg_resp,
				     NULL, info, tov))
				     NULL, info, tov)) {
		kfree(info);
		return -ECOMM;
		return -ECOMM;
	}
	return 0;
	return 0;
}
}