]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Fix memory leak in XDMCP logging code
authorRobert Ancell <robert.ancell@canonical.com>
Thu, 29 Oct 2015 22:11:28 +0000 (11:11 +1300)
committerRobert Ancell <robert.ancell@canonical.com>
Thu, 29 Oct 2015 22:11:28 +0000 (11:11 +1300)
src/xdmcp-server.c

index 4761b7b071385e984dd553768740982243445a19..085352e7fdae5773480c9ebdc69c912cc67f897f 100644 (file)
@@ -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)
             {