Skip to content

Commit beff654

Browse files
thenzlChristoph Hellwig
authored andcommitted
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>
1 parent 5f2d25e commit beff654

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/scsi/be2iscsi/be_mgmt.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,10 +1008,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
10081008
BE2_IPV6 : BE2_IPV4 ;
10091009

10101010
rc = mgmt_get_if_info(phba, ip_type, &if_info);
1011-
if (rc) {
1012-
kfree(if_info);
1011+
if (rc)
10131012
return rc;
1014-
}
10151013

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

0 commit comments

Comments
 (0)