From: Feng Li <lifeng1519@xxxxxxxxx> Memory leaks when memory allocation fails. Signed-off-by: Feng Li <lifeng1519@xxxxxxxxx> --- usr/iscsi/session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr/iscsi/session.c b/usr/iscsi/session.c index 22638e7..09d4442 100644 --- a/usr/iscsi/session.c +++ b/usr/iscsi/session.c @@ -98,6 +98,7 @@ int session_create(struct iscsi_connection *conn) if (conn->initiator_alias) { session->initiator_alias = strdup(conn->initiator_alias); if (!session->initiator_alias) { + free(session->initiator); free(session); return -ENOMEM; } -- 2.8.1 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html