ACK, thanks. (The actual "init_options()" bit is not the real cause of the memory leak here, as gc_init() doesn't allocate anything yet, but the read_config_string(...&sub...) will use the gc arena... interesting enough, the *final* uninit_options(&sub) in this function is a NO-OP, as gc_transfer() has moved all the allocated memory pointers to the top layer GC arena, and nothing is left in "sub" to cleanup...)
As another side note: while this is a memory leak in the case of errors, it's somewhat in the "it does not really matter" category, as an option parsing error *here* always leads to program end. This code can never be executed for server-pushed options (where parsing errors would be considered "warning" and a mem-leak would persist). Your patch has been applied to the master, release/2.4 and release/2.3 branch. commit d89e14d92623731d2fa6343a11072caab32e13cd (master) commit 42fc73b969f4e34fd985a0be59d162fb2ee498e1 (release/2.4) commit 64933bf444fd83a6f04a1a13f0b2a67caa43a2cb (release/2.3) Author: Guido Vranken Date: Fri Jun 9 00:04:36 2017 +0200 Fix memory leak in add_option() for option 'connection' Signed-off-by: Guido Vranken <guidovran...@gmail.com> Acked-by: Gert Doering <g...@greenie.muc.de> Message-Id: <CAO5O-E+HdfHNAK=--55054ab374u-ky4q_-3m114makfpds...@mail.gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14764.html Signed-off-by: Gert Doering <g...@greenie.muc.de> -- kind regards, Gert Doering ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel