sdp: fix Memory leak in error case
authorSatya Prakash Gupta <sp.gupta@samsung.com>
Thu, 31 Aug 2017 07:54:15 +0000 (13:24 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 31 Aug 2017 10:04:05 +0000 (11:04 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=787059

gst/rtsp-server/rtsp-sdp.c

index 0380f3e..b037b28 100644 (file)
@@ -128,6 +128,7 @@ mikey_add_crypto_sessions (GstRTSPStream * stream, GstMIKEYMessage * msg)
   session = gst_rtsp_stream_get_rtpsession (stream);
   if (session == NULL) {
     GST_ERROR ("unable to get RTP session from stream %p", stream);
+    gst_object_unref (encoder);
     return FALSE;
   }