From fb262fb5218a6176491dbb5fa75620e020de66d3 Mon Sep 17 00:00:00 2001 From: Alexandru Bogdan Stefan Date: Thu, 5 May 2016 15:31:30 +0300 Subject: [PATCH] free the sshPort to prevent memory leak --- shellinabox/service.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shellinabox/service.c b/shellinabox/service.c index 5cbb1b7..e0a3dd7 100644 --- a/shellinabox/service.c +++ b/shellinabox/service.c @@ -137,6 +137,7 @@ void initService(struct Service *service, const char *arg) { { int size = (tmp - ptr + 1); free(host); + free(sshPort); host = malloc(size); memset(host, 0, size); memcpy(host, ptr , size - 1);