mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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);
|
gst_props_unref (caps->properties);
|
||||||
g_free (caps->name);
|
g_free (caps->name);
|
||||||
|
|
||||||
|
#ifdef USE_POISONING
|
||||||
|
memset(caps, 0xff, sizeof(*caps));
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
gst_alloc_trace_free (_gst_caps_trace, caps);
|
gst_alloc_trace_free (_gst_caps_trace, caps);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -63,6 +63,10 @@ gst_probe_destroy (GstProbe *probe)
|
||||||
{
|
{
|
||||||
g_return_if_fail (probe);
|
g_return_if_fail (probe);
|
||||||
|
|
||||||
|
#ifdef USE_POISONING
|
||||||
|
memset(probe, 0xff, sizeof(*probe));
|
||||||
|
#endif
|
||||||
|
|
||||||
g_free (probe);
|
g_free (probe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +123,10 @@ gst_probe_dispatcher_destroy (GstProbeDispatcher *disp)
|
||||||
{
|
{
|
||||||
g_return_if_fail (disp);
|
g_return_if_fail (disp);
|
||||||
|
|
||||||
|
#ifdef USE_POISONING
|
||||||
|
memset(disp, 0xff, sizeof(*disp));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FIXME, free pending probes */
|
/* FIXME, free pending probes */
|
||||||
g_free (disp);
|
g_free (disp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -837,6 +837,9 @@ gst_props_entry_clean (GstPropsEntry *entry)
|
||||||
static inline void
|
static inline void
|
||||||
gst_props_entry_free (GstPropsEntry *entry)
|
gst_props_entry_free (GstPropsEntry *entry)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_POISONING
|
||||||
|
memset (entry, 0xff, sizeof(*entry));
|
||||||
|
#endif
|
||||||
gst_mem_chunk_free (_gst_props_entries_chunk, entry);
|
gst_mem_chunk_free (_gst_props_entries_chunk, entry);
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
gst_alloc_trace_free (_entries_trace, entry);
|
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_foreach (props->properties, (GFunc) gst_props_entry_destroy, NULL);
|
||||||
g_list_free (props->properties);
|
g_list_free (props->properties);
|
||||||
|
|
||||||
|
#ifdef USE_POISONING
|
||||||
|
memset(props, 0xff, sizeof(*props));
|
||||||
|
#endif
|
||||||
gst_mem_chunk_free (_gst_props_chunk, props);
|
gst_mem_chunk_free (_gst_props_chunk, props);
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
gst_alloc_trace_free (_props_trace, props);
|
gst_alloc_trace_free (_props_trace, props);
|
||||||
|
|
Loading…
Reference in a new issue