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; }