rtspsrc: fix minor leaks when handling server requests.
authorMiguel Angel Cabrera Moya <madmac2501@gmail.com>
Mon, 7 Feb 2011 22:32:53 +0000 (23:32 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 14 Feb 2011 10:33:18 +0000 (11:33 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=640163

gst/rtsp/gstrtspsrc.c

index 89b11d9..980fd02 100644 (file)
@@ -3374,9 +3374,10 @@ gst_rtspsrc_handle_request (GstRTSPSrc * src, GstRTSPConnection * conn,
       gst_rtsp_message_dump (&response);
 
     res = gst_rtspsrc_connection_send (src, conn, &response, NULL);
-    gst_rtsp_message_unset (&response);
     if (res < 0)
       goto send_error;
+
+    gst_rtsp_message_unset (&response);
   } else if (res == GST_RTSP_EEOF)
     return res;
 
@@ -3385,6 +3386,7 @@ gst_rtspsrc_handle_request (GstRTSPSrc * src, GstRTSPConnection * conn,
   /* ERRORS */
 send_error:
   {
+    gst_rtsp_message_unset (&response);
     return res;
   }
 }