fix leak of iscsi_context in iscsi_reconnect
in case the maximum number of reconnects is limited with iscsi_set_reconnect_max_retries() the an iscsi_context is leaked if the limit is exhausted. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -277,6 +277,7 @@ try_again:
|
||||
if (iscsi_full_connect_sync(iscsi, iscsi->portal, iscsi->lun) != 0) {
|
||||
if (iscsi->reconnect_max_retries != -1 && retry >= iscsi->reconnect_max_retries) {
|
||||
iscsi_defer_reconnect(old_iscsi);
|
||||
iscsi_destroy_context(iscsi);
|
||||
return -1;
|
||||
}
|
||||
int backoff=retry;
|
||||
|
||||
Reference in New Issue
Block a user