rtspsrc: fix minor leaks when handling server requests.

https://bugzilla.gnome.org/show_bug.cgi?id=640163
This commit is contained in:
Miguel Angel Cabrera Moya 2011-02-07 23:32:53 +01:00 committed by Wim Taymans
parent aa7e638d8e
commit 3cca27ced1

View file

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