CONNECT fixed memleak in case iscsi_connect_async fails directly
This commit is contained in:
committed by
Ronnie Sahlberg
parent
bdfa2833e5
commit
00baa9bd6c
@@ -154,6 +154,7 @@ iscsi_full_connect_async(struct iscsi_context *iscsi, const char *portal,
|
|||||||
ct->lun = lun;
|
ct->lun = lun;
|
||||||
ct->private_data = private_data;
|
ct->private_data = private_data;
|
||||||
if (iscsi_connect_async(iscsi, portal, iscsi_connect_cb, ct) != 0) {
|
if (iscsi_connect_async(iscsi, portal, iscsi_connect_cb, ct) != 0) {
|
||||||
|
iscsi_free(iscsi, ct);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user