mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
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.
This commit is contained in:
parent
e9f1e975df
commit
024d65e14e
@ -608,6 +608,7 @@ nt_service_install(int argc, char **argv)
|
|||||||
&sidUse) == 0) {
|
&sidUse) == 0) {
|
||||||
/* XXXX For some reason, the above test segfaults. Fix that. */
|
/* XXXX For some reason, the above test segfaults. Fix that. */
|
||||||
printf("User \"%s\" doesn't seem to exist.\n", user_acct);
|
printf("User \"%s\" doesn't seem to exist.\n", user_acct);
|
||||||
|
tor_free(command);
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
printf("Will try to install service as user \"%s\".\n", user_acct);
|
printf("Will try to install service as user \"%s\".\n", user_acct);
|
||||||
|
Loading…
Reference in New Issue
Block a user