commit 52d386c9b0507b09d4c3adb3e0916c1e14f7efe5
parent 319ce225815897d8626e85037ee203c4de634405
Author: Nick Mathewson <nickm@torproject.org>
Date: Mon, 17 Jun 2019 08:54:12 -0400
Merge remote-tracking branch 'tor-github/pr/1100'
Diffstat:
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/changes/bug30799 b/changes/bug30799
@@ -0,0 +1,4 @@
+ o Minor bugfixes (memory management):
+ - Stop leaking a small amount of memory in nt_service_install(), in
+ unreachable code. Fixes bug 30799; bugfix on 0.2.0.7-alpha.
+ Patch by Xiaoyin Liu.
diff --git a/scripts/maint/practracker/exceptions.txt b/scripts/maint/practracker/exceptions.txt
@@ -52,7 +52,7 @@ problem function-size /src/app/main/main.c:dumpstats() 102
problem function-size /src/app/main/main.c:tor_init() 137
problem function-size /src/app/main/main.c:sandbox_init_filter() 291
problem function-size /src/app/main/main.c:run_tor_main_loop() 105
-problem function-size /src/app/main/ntmain.c:nt_service_install() 125
+problem function-size /src/app/main/ntmain.c:nt_service_install() 126
problem file-size /src/core/mainloop/connection.c 5569
problem include-count /src/core/mainloop/connection.c 62
problem function-size /src/core/mainloop/connection.c:connection_free_minimal() 185
diff --git 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);