diff options
author | Max Kellermann <max@duempel.org> | 2014-01-07 23:33:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-07 23:35:18 +0100 |
commit | 27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2 (patch) | |
tree | 3f200069ab73baa09898fe1f242c6fd85396e2ba /src/event/ServerSocket.cxx | |
parent | 49f34fbf6861f10dbf9eb7549177888394926ff9 (diff) | |
download | mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.tar.gz mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.tar.xz mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.zip |
util/Alloc: new library replacing GLib's g_malloc()
Diffstat (limited to '')
-rw-r--r-- | src/event/ServerSocket.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 64e38776f..11592b4fb 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -31,12 +31,11 @@ #include "system/fd_util.h" #include "fs/AllocatedPath.hxx" #include "fs/FileSystem.hxx" +#include "util/Alloc.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "Log.hxx" -#include <glib.h> - #include <string> #include <algorithm> @@ -79,7 +78,7 @@ public: parent(_parent), serial(_serial), path(AllocatedPath::Null()), address_length(_address_length), - address((sockaddr *)g_memdup(_address, _address_length)) + address((sockaddr *)xmemdup(_address, _address_length)) { assert(_address != nullptr); assert(_address_length > 0); @@ -89,7 +88,7 @@ public: OneServerSocket &operator=(const OneServerSocket &other) = delete; ~OneServerSocket() { - g_free(address); + free(address); if (IsDefined()) Close(); |