tracers: leaks: fix potentially invalid memory access when trying to detect object...
authorCorentin Damman <c.damman@intopix.com>
Wed, 3 Aug 2022 11:10:02 +0000 (12:10 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 4 Aug 2022 10:55:15 +0000 (11:55 +0100)
commit75bdd2b7eb0f3a3308a0ec087c39e433be85b784
tree1ea65266f85604352ac56fa7c5b6a5211e47f3c0
parent5a055ae70af0252beb3a58f9e3f34633c98a930f
tracers: leaks: fix potentially invalid memory access when trying to detect object type

The is_gst_mini_object_check would sometimes detect a proper GObject
as a mini object, and then bad things happen.

We know whether a pointer is a proper GObject or a MiniObject here
though, so just pass that information to the right code paths and
avoid the heuristics altogether.

Eliminates all remaining uses of object_is_gst_mini_object().

Fixes #1334

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2832>
subprojects/gstreamer/plugins/tracers/gstleaks.c