)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"bc7d172cef7e17ab6c98c0e6a68c6f1d846d9310","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"0ec40edc_68083826","updated":"2026-06-22 08:04:42.000000000","message":"good find, and likely correct code, but I think the comment could be improved","commit_id":"a7817549891e7005fc0ca408396cfef95a1d30dd"}],"src/openvpn/options.c":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"bc7d172cef7e17ab6c98c0e6a68c6f1d846d9310","unresolved":true,"context_lines":[{"line_number":1536,"context_line":"     * in inherit_context_child()/inherit_context_top() shares with the source."},{"line_number":1537,"context_line":"     * Detach it too, otherwise pre_connect_restore()\u0027s gc_free() (or context"},{"line_number":1538,"context_line":"     * teardown) would free allocations the source context still references,"},{"line_number":1539,"context_line":"     * leading to a use-after-free/double-free. */"},{"line_number":1540,"context_line":"    gc_detach(\u0026o-\u003edns_options.gc);"},{"line_number":1541,"context_line":"    o-\u003eroutes \u003d NULL;"},{"line_number":1542,"context_line":"    o-\u003eclient_nat \u003d NULL;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"304399b5_36de541d","line":1539,"updated":"2026-06-22 08:04:42.000000000","message":"I\u0027m not sure this comment is all that useful in the grand scheme of things (why does it explain lots of detail about `dns_options.gc`, and no work about `o-\u003egc`?) - the in-code comment should not try to repeat the commit message, but explain the code :-)\n\nSo maybe a comment before the first `gc_detach()` that basically says the same, just for both?\n\n```\n  /* the option struct carriers two GC arenas, one generic and one for DNS options,\n   * which the by-value (...)\n   * gc_detach() basically just re-initializes the GC structure in the clone,\n   * so a gc_free() will never lead to a double free()\n   */\n```\nor something like that?","commit_id":"a7817549891e7005fc0ca408396cfef95a1d30dd"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"085d3979227e45fb52a5e60e9cef906e640cb372","unresolved":true,"context_lines":[{"line_number":1536,"context_line":"     * copy in inherit_context_child()/inherit_context_top() shares with the"},{"line_number":1537,"context_line":"     * source."},{"line_number":1538,"context_line":"     *"},{"line_number":1539,"context_line":"     * Detach both (i.e. re-inizialize them), otherwise child\u0027s call of"},{"line_number":1540,"context_line":"     * gc_free() (or context teardown) would free allocations the source"},{"line_number":1541,"context_line":"     * context still references, leading to a use-after-free (and subsequent"},{"line_number":1542,"context_line":"     * double-free)."}],"source_content_type":"text/x-csrc","patch_set":2,"id":"e035e838_43ea4663","line":1539,"updated":"2026-06-22 10:37:18.000000000","message":"\"initialize\"","commit_id":"bddd85297e4aa6c7c8560aa819d8ca3be54c5e52"}]}
