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>
This commit is contained in:
Родитель
5f2d25efa4
Коммит
beff65497a
|
@ -1008,10 +1008,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
|
||||||
BE2_IPV6 : BE2_IPV4 ;
|
BE2_IPV6 : BE2_IPV4 ;
|
||||||
|
|
||||||
rc = mgmt_get_if_info(phba, ip_type, &if_info);
|
rc = mgmt_get_if_info(phba, ip_type, &if_info);
|
||||||
if (rc) {
|
if (rc)
|
||||||
kfree(if_info);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
|
||||||
|
|
||||||
if (boot_proto == ISCSI_BOOTPROTO_DHCP) {
|
if (boot_proto == ISCSI_BOOTPROTO_DHCP) {
|
||||||
if (if_info->dhcp_state) {
|
if (if_info->dhcp_state) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче