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

Commit beff6549 authored by Tomas Henzl's avatar Tomas Henzl Committed by Christoph Hellwig
Browse files

be2iscsi: remove potential junk pointer free



commit 0e7c60cb [SCSI] be2iscsi: fix memory leak in error path
fixed an potential junk pointer free if  mgmt_get_if_info() returned an error

fix it on one more place

Signed-off-by: default avatarTomas Henzl <thenzl@redhat.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 5f2d25ef
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1008,10 +1008,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
		BE2_IPV6 : BE2_IPV4 ;

	rc = mgmt_get_if_info(phba, ip_type, &if_info);
	if (rc) {
		kfree(if_info);
	if (rc)
		return rc;
	}

	if (boot_proto == ISCSI_BOOTPROTO_DHCP) {
		if (if_info->dhcp_state) {