Don't free rtpinfo GString when it is NULL
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>
Mon, 3 Feb 2014 20:41:48 +0000 (22:41 +0200)
committerWim Taymans <wtaymans@redhat.com>
Fri, 7 Feb 2014 15:24:08 +0000 (16:24 +0100)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723554

gst/rtsp-server/rtsp-session-media.c

index da82167..9cee477 100644 (file)
@@ -337,7 +337,8 @@ not_prepared:
 stream_rtpinfo_missing:
   {
     g_mutex_unlock (&priv->lock);
-    g_string_free (rtpinfo, TRUE);
+    if (rtpinfo)
+      g_string_free (rtpinfo, TRUE);
     GST_ERROR_OBJECT (media, "could not get stream %d rtpinfo", i);
     return NULL;
   }