gdp: don't print already-freed string
authorTim-Philipp Müller <tim@centricular.com>
Mon, 9 Jun 2014 09:10:01 +0000 (10:10 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 9 Jun 2014 09:10:01 +0000 (10:10 +0100)
CID 1221987

gst/gdp/dataprotocol.c

index 420cdffd7eb0fffd8913313a27b76b71263d44dc..721cc60c647335adf2744b6649d8fb846fd392ce 100644 (file)
@@ -559,8 +559,8 @@ gst_dp_event_from_packet_1_0 (guint header_length, const guint8 * header,
         g_strndup ((gchar *) payload, GST_DP_HEADER_PAYLOAD_LENGTH (header));
     s = gst_structure_from_string (string, NULL);
     if (s == NULL) {
-      g_free (string);
       GST_WARNING ("Could not parse payload string: %s", string);
+      g_free (string);
       return NULL;
     }