[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.4] libtorrunner: fix memory leak in child() error path



commit 7ba1f3911691d211a0297a4ec486d40c3d70bd8c
Author: Martin Kepplinger <martink@xxxxxxxxx>
Date:   Tue Nov 13 10:09:29 2018 +0100

    libtorrunner: fix memory leak in child() error path
    
    This avoids leaking memory in case libtorrunner's child() function fails.
---
 src/tools/tor_runner.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tools/tor_runner.c b/src/tools/tor_runner.c
index 9ed2ee577..7c43b0d24 100644
--- a/src/tools/tor_runner.c
+++ b/src/tools/tor_runner.c
@@ -93,6 +93,7 @@ child(const tor_main_configuration_t *cfg)
   int rv = execv(BINDIR "/tor", args);
 
   if (rv < 0) {
+    free(args);
     exit(254);
   } else {
     abort(); /* Unreachable */



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits