[stgt] [PATCH] free target->redirect_info.callback upon iscsi target release

Alexander Nezhinsky alexandern at Voltaire.COM
Mon Oct 18 21:12:24 CEST 2010


Added missing free() of target->redirect_info.callback upon iscsi target 
release. When set, this field refers to a strdup'ed string.

Signed-off-by: Alexander Nezhinsky <alexandern at voltaire.com>
---
 usr/iscsi/target.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/usr/iscsi/target.c b/usr/iscsi/target.c
index f4842c9..89e282e 100644
--- a/usr/iscsi/target.c
+++ b/usr/iscsi/target.c
@@ -375,6 +375,8 @@ void iscsi_target_destroy(int tid)
 	}
 
 	list_del(&target->tlist);
+	if (target->redirect_info.callback) 
+		free(target->redirect_info.callback);
 	free(target);
 	isns_target_deregister(tgt_targetname(tid));
 
--
1.6.5
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list