Fix a memory leak in handling GETINFO.

Fixes bug 33103; bugfix on 0.4.3.1-alpha.
This commit is contained in:
Nick Mathewson 2020-02-05 19:18:32 -05:00
parent 2c4d7d8c65
commit 56c54a66bd
2 changed files with 4 additions and 0 deletions

3
changes/ticket33103 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes (controller):
- Fix a memory leak in GETINFO responses. Fixes bug 33103;
bugfix on 0.4.3.1-alpha.

View File

@ -1735,6 +1735,7 @@ handle_control_getinfo(control_connection_t *conn,
} }
} else { } else {
control_reply_add_one_kv(answers, 250, KV_RAW, q, ans); control_reply_add_one_kv(answers, 250, KV_RAW, q, ans);
tor_free(ans);
} }
} SMARTLIST_FOREACH_END(q); } SMARTLIST_FOREACH_END(q);