From: Marcus Prebble Date: Wed, 11 Nov 2015 13:58:33 +0000 (+0100) Subject: rtsp-server: Change the logic so we don't pop a NULL context X-Git-Tag: 1.19.3~495^2~590 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b90d4ba917dc3a1ad4a080b229a55931bc8e828d;p=platform%2Fupstream%2Fgstreamer.git rtsp-server: Change the logic so we don't pop a NULL context When doing a port scan (e.g. with nmap) the call to GST_RTSP_CHECK() will sometimes fail. This call is made before any context is pushed resulting in an attempt to pop a NULL context. https://bugzilla.gnome.org/show_bug.cgi?id=757949 --- diff --git a/gst/rtsp-server/rtsp-server.c b/gst/rtsp-server/rtsp-server.c index 45ae9db..37a3b0f 100644 --- a/gst/rtsp-server/rtsp-server.c +++ b/gst/rtsp-server/rtsp-server.c @@ -1191,9 +1191,11 @@ gst_rtsp_server_io_func (GSocket * socket, GIOCondition condition, manage_client (server, client); } else { GST_WARNING_OBJECT (server, "received unknown event %08x", condition); + goto exit_no_ctx; } exit: gst_rtsp_context_pop_current (&ctx); +exit_no_ctx: return G_SOURCE_CONTINUE; @@ -1204,7 +1206,8 @@ accept_failed: GST_ERROR_OBJECT (server, "Could not accept client on socket %p: %s", socket, str); g_free (str); - goto exit; + /* We haven't pushed the context yet, so just return */ + goto exit_no_ctx; } connection_refused: {