[gtk+] broadway: Don't bother memdup-ing



commit d7417580b72f9e3971c86085dd806834093952e5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Sep 26 14:09:35 2013 -0400

    broadway: Don't bother memdup-ing
    
    If we're going to run off the end due to an invalid message,
    we're going to run off the end. We'll protect this by doing
    proper bounds checking in the future, but the malloc gives
    us nothing for now.

 gdk/broadway/broadway-server.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c
index 0c56610..b246f71 100644
--- a/gdk/broadway/broadway-server.c
+++ b/gdk/broadway/broadway-server.c
@@ -568,9 +568,7 @@ parse_input (BroadwayInput *input)
           }
         else
           {
-            char *terminated = g_memdup ((char *)data, payload_len);
-            parse_input_message (input, terminated);
-            g_free (terminated);
+            parse_input_message (input, data);
           }
         break;
       case BROADWAY_WS_CNX_PING:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]