ccconverter: don't debug a potentially freed filter caps

Fixes a use-after-free

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4011>
This commit is contained in:
Matthew Waters 2023-02-21 15:19:35 +11:00
parent 26dd6c5c26
commit 921c93a9af

View file

@ -352,7 +352,6 @@ gst_cc_converter_transform_caps (GstBaseTransform * base,
tmp = gst_caps_intersect_full (filter, res, GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (res);
gst_caps_unref (filter);
res = tmp;
}
@ -363,6 +362,8 @@ gst_cc_converter_transform_caps (GstBaseTransform * base,
GST_DEBUG_OBJECT (self, "filter %" GST_PTR_FORMAT, filter);
GST_DEBUG_OBJECT (self, "to %" GST_PTR_FORMAT, res);
gst_clear_caps (&filter);
return res;
}