mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
Add code to poison objects being destroyed
Original commit message from CVS: Add code to poison objects being destroyed
This commit is contained in:
parent
a937894b48
commit
dd7878f38c
3 changed files with 18 additions and 0 deletions
|
@ -349,6 +349,10 @@ gst_caps_destroy (GstCaps *caps)
|
|||
gst_props_unref (caps->properties);
|
||||
g_free (caps->name);
|
||||
|
||||
#ifdef USE_POISONING
|
||||
memset(caps, 0xff, sizeof(*caps));
|
||||
#endif
|
||||
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
gst_alloc_trace_free (_gst_caps_trace, caps);
|
||||
#endif
|
||||
|
|
|
@ -63,6 +63,10 @@ gst_probe_destroy (GstProbe *probe)
|
|||
{
|
||||
g_return_if_fail (probe);
|
||||
|
||||
#ifdef USE_POISONING
|
||||
memset(probe, 0xff, sizeof(*probe));
|
||||
#endif
|
||||
|
||||
g_free (probe);
|
||||
}
|
||||
|
||||
|
@ -119,6 +123,10 @@ gst_probe_dispatcher_destroy (GstProbeDispatcher *disp)
|
|||
{
|
||||
g_return_if_fail (disp);
|
||||
|
||||
#ifdef USE_POISONING
|
||||
memset(disp, 0xff, sizeof(*disp));
|
||||
#endif
|
||||
|
||||
/* FIXME, free pending probes */
|
||||
g_free (disp);
|
||||
}
|
||||
|
|
|
@ -837,6 +837,9 @@ gst_props_entry_clean (GstPropsEntry *entry)
|
|||
static inline void
|
||||
gst_props_entry_free (GstPropsEntry *entry)
|
||||
{
|
||||
#ifdef USE_POISONING
|
||||
memset (entry, 0xff, sizeof(*entry));
|
||||
#endif
|
||||
gst_mem_chunk_free (_gst_props_entries_chunk, entry);
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
gst_alloc_trace_free (_entries_trace, entry);
|
||||
|
@ -1416,6 +1419,9 @@ gst_props_destroy (GstProps *props)
|
|||
g_list_foreach (props->properties, (GFunc) gst_props_entry_destroy, NULL);
|
||||
g_list_free (props->properties);
|
||||
|
||||
#ifdef USE_POISONING
|
||||
memset(props, 0xff, sizeof(*props));
|
||||
#endif
|
||||
gst_mem_chunk_free (_gst_props_chunk, props);
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
gst_alloc_trace_free (_props_trace, props);
|
||||
|
|
Loading…
Reference in a new issue