[tor-commits] [obfsproxy/master] Fixed memory leak when incorrect arguments are given. Fixes bug5068.

arma at torproject.org arma at torproject.org
Mon Feb 13 05:48:18 UTC 2012


commit 79c44ced73a77ba045473c0fd2c8015a064e10ae
Author: Brendan C <temurion at gmail.com>
Date:   Sun Feb 12 12:26:38 2012 -0600

    Fixed memory leak when incorrect arguments are given. Fixes bug5068.
---
 src/external.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/external.c b/src/external.c
index 3a79909..76abf56 100644
--- a/src/external.c
+++ b/src/external.c
@@ -56,8 +56,10 @@ launch_external_proxy(const char *const *begin)
       usage();
     } else {
       config_t *cfg = config_create(end - begin, begin);
-      if (!cfg)
+      if (!cfg) {
+        smartlist_free(configs);
         return -1; /* diagnostic already issued */
+      }
       smartlist_add(configs, cfg);
     }
     begin = end;



More information about the tor-commits mailing list