aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2020-01-24 09:06:30 -0600
committerTaylor Yu <catalyst@torproject.org>2020-01-24 12:20:47 -0600
commitf7a2b98674040f191e4a44d59610cc018fccb461 (patch)
treed2b46a28ebe159f362946ebbd60aa7aaf7f22537 /src
parent7c76cedf0fea5117612018bf8b07e6fe91e967e7 (diff)
downloadtor-f7a2b98674040f191e4a44d59610cc018fccb461.tar.gz
tor-f7a2b98674040f191e4a44d59610cc018fccb461.zip
fix leak in GETCONF
Fix a memory leak introduced by refactoring of control reply formatting code. Fixes bug 33039; bugfix on 0.4.3.1-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/feature/control/control_cmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c
index 5fceb404e3..c2d23243e5 100644
--- a/src/feature/control/control_cmd.c
+++ b/src/feature/control/control_cmd.c
@@ -323,10 +323,8 @@ handle_control_getconf(control_connection_t *conn,
send_control_done(conn);
}
- SMARTLIST_FOREACH(answers, char *, cp, tor_free(cp));
- smartlist_free(answers);
- smartlist_free(unrecognized);
-
+ control_reply_free(answers);
+ control_reply_free(unrecognized);
return 0;
}