Merge pull request #372 from StefanAlexandruBogdan/master

free the sshPort to prevent memory leak and indent newly added code to preserve code styling
This commit is contained in:
Luka Krajger 2016-05-05 16:18:05 -04:00
commit e05c6d8178

View file

@ -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);