summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2015-10-30 11:11:28 +1300
committerRobert Ancell <robert.ancell@canonical.com>2015-10-30 11:11:28 +1300
commitadb9291b3783e2c2ce9ae316b1a9d041c32a88c6 (patch)
treee7fe4bd83c961ff8ac3b5cf2ab16afca4df83ead
parent78c65e8826f200e4e53aed8b67b514ec03dca56a (diff)
downloadlightdm-adb9291b3783e2c2ce9ae316b1a9d041c32a88c6.tar.gz
Fix memory leak in XDMCP logging code
-rw-r--r--src/xdmcp-server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xdmcp-server.c b/src/xdmcp-server.c
index 4761b7b0..085352e7 100644
--- a/src/xdmcp-server.c
+++ b/src/xdmcp-server.c
@@ -625,7 +625,11 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server)
packet = xdmcp_packet_decode ((guint8 *)data, n_read);
if (packet)
{
- g_debug ("Got %s", xdmcp_packet_tostring (packet));
+ gchar *packet_string;
+
+ packet_string = xdmcp_packet_tostring (packet);
+ g_debug ("Got %s", packet_string);
+ g_free (packet_string);
switch (packet->opcode)
{