summaryrefslogtreecommitdiffstats
path: root/sesman/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sesman/scp.c')
-rw-r--r--sesman/scp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sesman/scp.c b/sesman/scp.c
index e4abe004..d81de0ab 100644
--- a/sesman/scp.c
+++ b/sesman/scp.c
@@ -36,7 +36,7 @@ void *DEFAULT_CC
scp_process_start(void *sck)
{
struct SCP_CONNECTION scon;
- struct SCP_SESSION *sdata;
+ struct SCP_SESSION *sdata = NULL;
scon.in_sck = (int)(tintptr)sck;
LOG_DBG("started scp thread on socket %d", scon.in_sck);
@@ -89,9 +89,16 @@ scp_process_start(void *sck)
break;
default:
log_message(LOG_LEVEL_ALWAYS, "unknown return from scp_vXs_accept()");
+ break;
}
free_stream(scon.in_s);
free_stream(scon.out_s);
+
+ if (sdata)
+ {
+ scp_session_destroy(sdata);
+ }
+
return 0;
}