udp: don't use protocol in debug message after freeing
authorStefan Kost <ensonic@users.sf.net>
Tue, 31 Mar 2009 08:50:41 +0000 (11:50 +0300)
committerStefan Kost <ensonic@users.sf.net>
Tue, 31 Mar 2009 08:50:41 +0000 (11:50 +0300)
gst/udp/gstudpsink.c
gst/udp/gstudpsrc.c

index a9666ed..cc5c84d 100644 (file)
@@ -223,9 +223,9 @@ gst_udpsink_set_uri (GstUDPSink * sink, const gchar * uri)
   /* ERRORS */
 wrong_protocol:
   {
-    g_free (protocol);
     GST_ELEMENT_ERROR (sink, RESOURCE, READ, (NULL),
         ("error parsing uri %s: wrong protocol (%s != udp)", uri, protocol));
+    g_free (protocol);
     return FALSE;
   }
 }
index df2b893..c84e46c 100644 (file)
@@ -645,9 +645,9 @@ gst_udpsrc_set_uri (GstUDPSrc * src, const gchar * uri)
   /* ERRORS */
 wrong_protocol:
   {
-    g_free (protocol);
     GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
         ("error parsing uri %s: wrong protocol (%s != udp)", uri, protocol));
+    g_free (protocol);
     return FALSE;
   }
 }