On 07/07/17 23:11, Christian Hesse wrote:
> Thomas Veerman via Openvpn-devel <openvpn-devel@lists.sourceforge.net> on
> Fri, 2017/07/07 21:59:
>>          else if (streq(p[1], "SOCKS"))
>>          {
>>              ce->socks_proxy_server = string_alloc(p[2], gc);
>> -            ce->socks_proxy_port = p[3];
>> +            ce->socks_proxy_port = string_alloc(p[3], gc);
>>              ret = true;
>>          }
>>      }
> 
> If we allocate memory here, is it freed later?
> 
> A quick look at options.h shows this is (const char *).

It is allocated with a gc (garbage collector), so when there is is a
gc_free() on the gc, all allocations connected to that gc gets freed all
at once.


-- 
kind regards,

David Sommerseth
OpenVPN Technologies, Inc


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
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

Reply via email to