]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix leak in GETCONF
authorTaylor Yu <catalyst@torproject.org>
Fri, 24 Jan 2020 15:06:30 +0000 (09:06 -0600)
committerTaylor Yu <catalyst@torproject.org>
Fri, 24 Jan 2020 18:20:47 +0000 (12:20 -0600)
Fix a memory leak introduced by refactoring of control reply
formatting code.  Fixes bug 33039; bugfix on 0.4.3.1-alpha.

src/feature/control/control_cmd.c

index 5fceb404e3b3e037a19c278a2e49657fd405db7d..c2d23243e55c5ee2f95b62f064411a0572d6c048 100644 (file)
@@ -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;
 }