diff options
author | Max Kellermann <max@duempel.org> | 2009-01-25 18:47:21 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-25 18:47:21 +0100 |
commit | a45922cd66cf8a7a03905c020e50ab01dc05cfa9 (patch) | |
tree | 2171f4d74886b9d049eafe14dc2b1ce72036c912 /src/client.c | |
parent | 7960ad32fcfb1e17c24d3b26e53a1cdbc5ca0028 (diff) | |
download | mpd-a45922cd66cf8a7a03905c020e50ab01dc05cfa9.tar.gz mpd-a45922cd66cf8a7a03905c020e50ab01dc05cfa9.tar.xz mpd-a45922cd66cf8a7a03905c020e50ab01dc05cfa9.zip |
use g_free() instead of free()
On some platforms, g_free() must be used for memory allocated by
GLib. This patch intends to correct a lot of occurrences, but is
probably not complete.
Diffstat (limited to '')
-rw-r--r-- | src/client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.c b/src/client.c index 589e48c5d..1b08333bb 100644 --- a/src/client.c +++ b/src/client.c @@ -240,7 +240,7 @@ static void client_close(struct client *client) g_log(G_LOG_DOMAIN, LOG_LEVEL_SECURE, "client %i: closed", client->num); - free(client); + g_free(client); } static const char * @@ -637,7 +637,7 @@ static void client_write_deferred(struct client *client) assert(client->deferred_bytes >= decr); client->deferred_bytes -= decr; - free(buf); + g_free(buf); g_queue_pop_head(client->deferred_send); } client->lastTime = time(NULL); @@ -778,7 +778,7 @@ void client_vprintf(struct client *client, const char *fmt, va_list args) buffer = g_malloc(length + 1); vsnprintf(buffer, length + 1, fmt, args); client_write(client, buffer, length); - free(buffer); + g_free(buffer); } G_GNUC_PRINTF(2, 3) void client_printf(struct client *client, const char *fmt, ...) |