Procházet zdrojové kódy

Merge remote-tracking branch 'tor-github/pr/1100'

Nick Mathewson před 5 roky
rodič
revize
52d386c9b0

+ 4 - 0
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.

+ 1 - 1
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

+ 1 - 0
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);