va: device: use gst_clear_object()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1529>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-09-16 19:14:30 +02:00
parent 6af7ec3c0f
commit f6a623d565

View file

@ -35,8 +35,7 @@ GST_DEFINE_MINI_OBJECT_TYPE (GstVaDevice, gst_va_device);
static void
gst_va_device_free (GstVaDevice * device)
{
if (device->display)
gst_object_unref (device->display);
gst_clear_object (&device->display);
g_free (device->render_device_path);
g_free (device);
}