Blame SOURCES/0002-fix-leak-of-iscsi_context-in-iscsi_reconnect.patch

a66d21
From 5a94d5d73a18369e6f7b7c54674dc20b9c7d0a8e Mon Sep 17 00:00:00 2001
a66d21
From: Peter Lieven <pl@kamp.de>
a66d21
Date: Mon, 11 Mar 2013 08:51:18 +0100
a66d21
Subject: [RHEL7 libiscsi PATCH 02/18] fix leak of iscsi_context in iscsi_reconnect
a66d21
a66d21
in case the maximum number of reconnects is limited with
a66d21
iscsi_set_reconnect_max_retries() the an iscsi_context
a66d21
is leaked if the limit is exhausted.
a66d21
a66d21
Signed-off-by: Peter Lieven <pl@kamp.de>
a66d21
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
a66d21
(cherry-picked from upstream commit 5a94d5d73a18369e6f7b7c54674dc20b9c7d0a8e)
a66d21
---
a66d21
 lib/connect.c | 1 +
a66d21
 1 file changed, 1 insertion(+)
a66d21
a66d21
diff --git a/lib/connect.c b/lib/connect.c
a66d21
index d3fa9d1..7429496 100644
a66d21
--- a/lib/connect.c
a66d21
+++ b/lib/connect.c
a66d21
@@ -277,6 +277,7 @@ try_again:
a66d21
 	if (iscsi_full_connect_sync(iscsi, iscsi->portal, iscsi->lun) != 0) {
a66d21
 		if (iscsi->reconnect_max_retries != -1 && retry >= iscsi->reconnect_max_retries) {
a66d21
 			iscsi_defer_reconnect(old_iscsi);
a66d21
+			iscsi_destroy_context(iscsi);
a66d21
 			return -1;
a66d21
 		}
a66d21
 		int backoff=retry;
a66d21
-- 
a66d21
1.8.1.4
a66d21