> I can see why we do this gc_addspecial() dance in socket.c (because the > elements returned by getaddrinfo() are being pointed at, not copied). > > This usage here seems unneeded, as the code will walk netlist, copy > out the IPv4 addresses into a separate (gc-allocated) struct route_ipv4, > and never use parts of netlist again - so freeaddrinfo() *should* work, > and make the code slightly less complex. > > Arne, this came from you in commit e719a053534 (and I ACKed it) - could > you revisit this particular use and check whether it's truly needed? >
I don't think it is really needed. It is more consistency and we try to use gc functions instead of free/malloc. Arne