diff options
| author | Pavel Roskin <plroskin@gmail.com> | 2016-10-16 23:40:54 -0700 |
|---|---|---|
| committer | Pavel Roskin <plroskin@gmail.com> | 2016-10-21 20:15:50 +0000 |
| commit | e17a56efb6750e7db8d060bd1a648a946395ef80 (patch) | |
| tree | f67d622a90e3584b5aeba390bd8c5d945f04d5d6 | |
| parent | 65ac8e758b6bd1458c8228613db4fec99d54d86f (diff) | |
| download | xrdp-proprietary-e17a56efb6750e7db8d060bd1a648a946395ef80.tar.gz xrdp-proprietary-e17a56efb6750e7db8d060bd1a648a946395ef80.zip | |
Call auth_end() exactly once in scp_v0_process()
As discovered by Valgrind, it wasn't called at all in case of a
successful session creation, which leaked memory.
| -rw-r--r-- | sesman/scp_v0.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c index efa9080c..565dacb8 100644 --- a/sesman/scp_v0.c +++ b/sesman/scp_v0.c @@ -68,8 +68,6 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) s->username); scp_v0s_replyauthentication(c, errorcode); } - - auth_end(data); } else if (data) { @@ -94,8 +92,6 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) } session_reconnect(display, s->username); - auth_end(data); - /* don't set data to null here */ } else { @@ -148,7 +144,6 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) if (display == 0) { - auth_end(data); scp_v0s_deny_connection(c); } else @@ -160,4 +155,5 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) { scp_v0s_deny_connection(c); } + auth_end(data); } |
