summaryrefslogtreecommitdiffstats
path: root/sesman/scp_v1_mng.c
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-10-16 23:40:47 -0700
committerPavel Roskin <plroskin@gmail.com>2016-10-21 20:15:50 +0000
commit65ac8e758b6bd1458c8228613db4fec99d54d86f (patch)
tree49336ba19adf42784764d85c0e9f0d1037f1ed85 /sesman/scp_v1_mng.c
parent8bf28e45c4ff59f3195966a107611b211ee5aca3 (diff)
downloadxrdp-proprietary-65ac8e758b6bd1458c8228613db4fec99d54d86f.tar.gz
xrdp-proprietary-65ac8e758b6bd1458c8228613db4fec99d54d86f.zip
Fix memory leak: free session data
Call scp_session_destroy() in the functions that call scp_session_create() and nowhere else. As found by Valgrind, the session data is not freed if the session is created successfully.
Diffstat (limited to 'sesman/scp_v1_mng.c')
-rw-r--r--sesman/scp_v1_mng.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sesman/scp_v1_mng.c b/sesman/scp_v1_mng.c
index 29496466..61789cce 100644
--- a/sesman/scp_v1_mng.c
+++ b/sesman/scp_v1_mng.c
@@ -50,7 +50,6 @@ scp_v1_mng_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
scp_v1s_mng_deny_connection(c, "Login failed");
log_message(LOG_LEVEL_INFO,
"[MNG] Login failed for user %s. Connection terminated", s->username);
- scp_session_destroy(s);
auth_end(data);
return;
}
@@ -61,7 +60,6 @@ scp_v1_mng_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
scp_v1s_mng_deny_connection(c, "Access to Terminal Server not allowed.");
log_message(LOG_LEVEL_INFO,
"[MNG] User %s not allowed on TS. Connection terminated", s->username);
- scp_session_destroy(s);
auth_end(data);
return;
}
@@ -105,7 +103,6 @@ scp_v1_mng_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
}
/* cleanup */
- scp_session_destroy(s);
auth_end(data);
}