From: Taylor Yu Date: Fri, 24 Jan 2020 15:06:30 +0000 (-0600) Subject: fix leak in GETCONF X-Git-Tag: tor-0.4.3.2-alpha~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7a2b98674040f191e4a44d59610cc018fccb461;p=thirdparty%2Ftor.git 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. --- 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; }