diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-04-17 11:34:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-04-17 11:34:15 -0400 |
commit | 0a9c17a61ad7193a051c53ea2a0cb91e012f014e (patch) | |
tree | 01113e25767d4922902b572d6bdc65338eb74454 /src/or/config.c | |
parent | afca9ab14ee16b8dcfcde40a13d49f3612138dcb (diff) | |
download | tor-0a9c17a61ad7193a051c53ea2a0cb91e012f014e.tar.gz tor-0a9c17a61ad7193a051c53ea2a0cb91e012f014e.zip |
Fix memory leak when sending configuration-changed event
Fix for bug #8718; bugfix on 0.2.3.3-alpha.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 16eadf917b..236955b2bf 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -785,12 +785,13 @@ set_options(or_options_t *new_val, char **msg) tor_free(line); } } else { - smartlist_add(elements, (char*)options_format.vars[i].name); + smartlist_add(elements, tor_strdup(options_format.vars[i].name)); smartlist_add(elements, NULL); } } } control_event_conf_changed(elements); + SMARTLIST_FOREACH(elements, char *, cp, tor_free(cp)); smartlist_free(elements); } |