caps: fix race condition and memory leak in gst_static_caps_get
authorRené Stadler <rene.stadler@collabora.co.uk>
Mon, 17 Oct 2011 11:55:35 +0000 (13:55 +0200)
committerRené Stadler <rene.stadler@collabora.co.uk>
Mon, 17 Oct 2011 11:59:49 +0000 (13:59 +0200)
commit221836f452264e97e99ddec9cd59d9e853c7d52e
tree51e4756d8c869e8488f3db68e4d6c86078824077
parentacd905d78a2961b2ebe028f425269c5e628d67a4
caps: fix race condition and memory leak in gst_static_caps_get

This was leaking the PtrArray from caps->priv, as set up by the other call to
gst_caps_init. Also, the thread safety issue presented in the comment above was
not taken care of anymore. We now zero the refcount again when publishing the
structure.

Fixes #661629.
gst/gstcaps.c