summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2015-10-30 12:17:19 +1300
committerRobert Ancell <robert.ancell@canonical.com>2015-10-30 12:17:19 +1300
commit8f9bc698854710a05ade8fc462e1874670b60071 (patch)
tree376f2bc68f060aa0c809765c92aec1bf60ee64e4
parent3baff5aca674aa0c37f009cce246fc251e946a66 (diff)
downloadlightdm-git-8f9bc698854710a05ade8fc462e1874670b60071.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 d12b0359..d1cea2f3 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)
{