diff options
author | Tomas Henzl <thenzl@redhat.com> | 2014-06-06 08:22:44 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-06-25 07:29:05 -0400 |
commit | beff65497ab12821c65739557c77d85bdd4ca618 (patch) | |
tree | f3d684967fd9eed61639ad2b48ea8dd1a312e677 /drivers/scsi/be2iscsi | |
parent | 5f2d25efa4c4567fa72b70de4e041252c72aa10e (diff) |
be2iscsi: remove potential junk pointer free
commit 0e7c60c [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: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 6045aa78986a..07934b0b9ee1 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c | |||
@@ -1008,10 +1008,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba, | |||
1008 | BE2_IPV6 : BE2_IPV4 ; | 1008 | BE2_IPV6 : BE2_IPV4 ; |
1009 | 1009 | ||
1010 | rc = mgmt_get_if_info(phba, ip_type, &if_info); | 1010 | rc = mgmt_get_if_info(phba, ip_type, &if_info); |
1011 | if (rc) { | 1011 | if (rc) |
1012 | kfree(if_info); | ||
1013 | return rc; | 1012 | return rc; |
1014 | } | ||
1015 | 1013 | ||
1016 | if (boot_proto == ISCSI_BOOTPROTO_DHCP) { | 1014 | if (boot_proto == ISCSI_BOOTPROTO_DHCP) { |
1017 | if (if_info->dhcp_state) { | 1015 | if (if_info->dhcp_state) { |