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

[tor-commits] [tor/maint-0.3.0] Fix a memory leak in config_get_assigned_option()



commit 27058bd8cb84c523ff5216bababd6c6b7f4f9bfe
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Mar 8 10:06:48 2017 -0500

    Fix a memory leak in config_get_assigned_option()
    
    This was introducd in 4d83999213712c7 in 0.3.0.3-alpha.  This is bug
    21682.
---
 changes/bug21682   | 3 +++
 src/or/confparse.c | 1 +
 2 files changed, 4 insertions(+)

diff --git a/changes/bug21682 b/changes/bug21682
new file mode 100644
index 0000000..ab7126e
--- /dev/null
+++ b/changes/bug21682
@@ -0,0 +1,3 @@
+  o Minor bugfixes (memory leaks):
+    - Fix a memory leak when using GETCONF on a port option.
+      Fixes bug 21682; bugfix on 0.3.0.3-alpha.
diff --git a/src/or/confparse.c b/src/or/confparse.c
index 9e352ac..9b13a91 100644
--- a/src/or/confparse.c
+++ b/src/or/confparse.c
@@ -779,6 +779,7 @@ config_get_assigned_option(const config_format_t *fmt, const void *options,
       tor_free(result);
       return NULL;
     case CONFIG_TYPE_LINELIST_S:
+      tor_free(result->key);
       tor_free(result);
       result = config_lines_dup_and_filter(*(const config_line_t **)value,
                                            key);



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