rtspconnection: Fix minor memory leaks in error handling
authorOgnyan Tonchev <otonchev@gmail.com>
Sun, 16 Mar 2014 16:04:44 +0000 (17:04 +0100)
committerWim Taymans <wtaymans@redhat.com>
Mon, 24 Mar 2014 11:45:14 +0000 (12:45 +0100)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726642

gst-libs/gst/rtsp/gstrtspconnection.c

index bb20822..5d1556a 100644 (file)
@@ -877,6 +877,7 @@ connect_failed:
   {
     GST_ERROR ("failed to connect: %s", error->message);
     g_clear_error (&error);
+    g_free (uri);
     return GST_RTSP_ERROR;
   }
 remote_address_failed:
@@ -884,11 +885,13 @@ remote_address_failed:
     GST_ERROR ("failed to connect: %s", error->message);
     g_object_unref (connection);
     g_clear_error (&error);
+    g_free (uri);
     return GST_RTSP_ERROR;
   }
 tunneling_failed:
   {
     GST_ERROR ("failed to setup tunneling");
+    g_free (uri);
     return res;
   }
 }