dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
797 stars 195 forks source link

Release allocated memory by getaddrinfo - memory leak fix #47

Closed jaroslavrehorka closed 7 years ago

jaroslavrehorka commented 7 years ago

In file libinetsocket.c on line 322, getaddrinfo allocates memory that is not released anywhere later and that causes memory leak on every call of sendto_inet_dgram_socket.

Adding freeaddrinfo on line 342 should fix this.

Thank you for this lib, it's great :1st_place_medal:

dermesser commented 7 years ago

thank you!