GNOME Bugzilla – Bug 761226
rtspmedia: Missing lock various functions (or the curious case of the duplicate unlocks)
Last modified: 2016-04-14 17:42:58 UTC
In the following functions there is a locking issue, that is best described as a curious case of 'duplicate unlocks'. file: gst/rtsp-server/rtsp-media.c functions: - gst_rtsp_media_get_retransmission_time - gst_rtsp_media_get_latency - gst_rtsp_media_is_time_provider example: guint gst_rtsp_media_get_latency (GstRTSPMedia * media) { GstRTSPMediaPrivate *priv; guint res; g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), FALSE); priv = media->priv; g_mutex_unlock (&priv->lock); // <<<<<------ should be g_mutex_lock res = priv->latency; g_mutex_unlock (&priv->lock); return res; }
Created attachment 319898 [details] [review] patch to fix the unlocking/locking issue
commit fefc011dfbc0f727f212baa2759434e1591e1821 Author: Steven Hoving <sh@bigbrother.nl> Date: Thu Jan 28 09:22:18 2016 +0100 rtsp-media: Fix mutex beeing unlocked while they should be locked https://bugzilla.gnome.org/show_bug.cgi?id=761226
Picked into 1.6 branch as well.