From 3cca27ced16fbcc2a93653b9db0aeffadbe275b1 Mon Sep 17 00:00:00 2001 From: Miguel Angel Cabrera Moya Date: Mon, 7 Feb 2011 23:32:53 +0100 Subject: [PATCH] rtspsrc: fix minor leaks when handling server requests. https://bugzilla.gnome.org/show_bug.cgi?id=640163 --- gst/rtsp/gstrtspsrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 89b11d90a0..980fd026f9 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -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; } }