diff options
author | Xiaoyin Liu <xiaoyinl@users.noreply.github.com> | 2019-06-07 17:13:49 +0800 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-06-11 15:12:20 +1000 |
commit | 024d65e14e062803523fb8ee1dd775ef5d2e96fa (patch) | |
tree | 5f14073868b5c1b75f83cade1e9f0eb50f06d267 /src/app/main/ntmain.c | |
parent | e9f1e975df89bbb08fb183ede5629e4025b44c44 (diff) | |
download | tor-024d65e14e062803523fb8ee1dd775ef5d2e96fa.tar.gz tor-024d65e14e062803523fb8ee1dd775ef5d2e96fa.zip |
Free a string buffer in nt_service_install()
The string buffer "command" is not freed if the specified account
name doesn't exist. This patch fixes this bug.
Diffstat (limited to 'src/app/main/ntmain.c')
-rw-r--r-- | src/app/main/ntmain.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c index f00b712702..a2de5bb87e 100644 --- a/src/app/main/ntmain.c +++ b/src/app/main/ntmain.c @@ -608,6 +608,7 @@ nt_service_install(int argc, char **argv) &sidUse) == 0) { /* XXXX For some reason, the above test segfaults. Fix that. */ printf("User \"%s\" doesn't seem to exist.\n", user_acct); + tor_free(command); return -1; } else { printf("Will try to install service as user \"%s\".\n", user_acct); |