pad: unlock before freeing the cache to avoid deadlock
authorHavard Graff <havard.graff@tandberg.com>
Tue, 19 Apr 2011 12:05:23 +0000 (14:05 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 19 Apr 2011 14:15:34 +0000 (15:15 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=648199

gst/gstpad.c

index 5a1cb80..a599d42 100644 (file)
@@ -4718,8 +4718,8 @@ slow_path:
   }
 invalid:
   {
-    pad_free_cache (cache);
     GST_PAD_STREAM_UNLOCK (peer);
+    pad_free_cache (cache);
     goto slow_path;
   }
 }
@@ -4830,8 +4830,8 @@ slow_path:
   }
 invalid:
   {
-    pad_free_cache (cache);
     GST_PAD_STREAM_UNLOCK (peer);
+    pad_free_cache (cache);
     goto slow_path;
   }
 }