From 8322fd6acbbe5d5c937a04e1696512d2889cc2e1 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 12 Jun 2019 09:53:13 +0200 Subject: #896 Fix memory leak in wake_up_broadcast() call freeifaddrs() after getifaddrs() to release memory. --- sources/ogAdmServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources') 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)); -- cgit v1.2.3-18-g5258