diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-06-12 09:53:13 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-06-12 11:01:33 +0200 |
commit | 8322fd6acbbe5d5c937a04e1696512d2889cc2e1 (patch) | |
tree | cdecd802e0a60cd04cd7ebf053eeb02db260cdff /sources/ogAdmServer.cpp | |
parent | b35438d27e00ec63d68018268c2733ec14c39e00 (diff) |
#896 Fix memory leak in wake_up_broadcast()
call freeifaddrs() after getifaddrs() to release memory.
Diffstat (limited to 'sources/ogAdmServer.cpp')
-rw-r--r-- | sources/ogAdmServer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 6575edd..d70aa0c 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -1287,7 +1287,7 @@ static bool wake_up_broadcast(int sd, struct sockaddr_in *client, client->sin_addr.s_addr = broadcast_addr->sin_addr.s_addr; break; } - free(ifaddr); + freeifaddrs(ifaddr); ret = sendto(sd, msg, sizeof(*msg), 0, (sockaddr *)client, sizeof(*client)); |