_gst_buffer_list_free (GstBufferList * list)
{
guint i, len;
+ gsize slice_size;
GST_LOG ("free %p", list);
if (GST_BUFFER_LIST_IS_USING_DYNAMIC_ARRAY (list))
g_free (list->buffers);
- g_slice_free1 (list->slice_size, list);
+ slice_size = list->slice_size;
+
+#ifdef USE_POISONING
+ memset (list, 0xff, slice_size);
+#endif
+
+ g_slice_free1 (slice_size, list);
}
static void
#ifdef DEBUG_REFCOUNT
GST_CAT_TRACE (GST_CAT_CAPS, "freeing caps %p", caps);
#endif
+
+#ifdef USE_POISONING
+ memset (caps, 0xff, sizeof (GstCapsImpl));
+#endif
+
g_slice_free1 (sizeof (GstCapsImpl), caps);
}
}
g_free (context->context_type);
+#ifdef USE_POISONING
+ memset (context, 0xff, sizeof (GstContext));
+#endif
+
g_slice_free1 (sizeof (GstContext), context);
}
gst_date_time_free (GstDateTime * datetime)
{
g_date_time_unref (datetime->datetime);
+
+#ifdef USE_POISONING
+ memset (datetime, 0xff, sizeof (GstDateTime));
+#endif
+
g_slice_free (GstDateTime, datetime);
}
gst_structure_set_parent_refcount (s, NULL);
gst_structure_free (s);
}
+#ifdef USE_POISONING
+ memset (event, 0xff, sizeof (GstEventImpl));
+#endif
g_slice_free1 (sizeof (GstEventImpl), event);
}
allocator = mem->allocator;
gst_allocator_free (allocator, mem);
+
gst_object_unref (allocator);
}
gst_structure_set_parent_refcount (structure, NULL);
gst_structure_free (structure);
}
+#ifdef USE_POISONING
+ memset (message, 0xff, sizeof (GstMessageImpl));
+#endif
g_slice_free1 (sizeof (GstMessageImpl), message);
}
g_cond_clear (GST_PROMISE_COND (promise));
GST_LOG ("%p finalized", promise);
+#ifdef USE_POISONING
+ memset (promise, 0xff, sizeof (GstPromiseImpl));
+#endif
+
g_free (promise);
}
gst_structure_set_parent_refcount (s, NULL);
gst_structure_free (s);
}
+#ifdef USE_POISONING
+ memset (query, 0xff, sizeof (GstQueryImpl));
+#endif
g_slice_free1 (sizeof (GstQueryImpl), query);
}
GST_MINI_OBJECT_CAST (sample));
gst_buffer_list_unref (sample->buffer_list);
}
+#ifdef USE_POISONING
+ memset (sample, 0xff, sizeof (GstSample));
+#endif
g_slice_free1 (sizeof (GstSample), sample);
}
gst_structure_free (GST_TAG_LIST_STRUCTURE (list));
+#ifdef USE_POISONING
+ memset (list, 0xff, sizeof (GstTagListImpl));
+#endif
+
g_slice_free1 (sizeof (GstTagListImpl), list);
}
if (toc->tags != NULL)
gst_tag_list_unref (toc->tags);
+#ifdef USE_POISONING
+ memset (toc, 0xff, sizeof (GstToc));
+#endif
+
g_slice_free (GstToc, toc);
}
if (entry->tags != NULL)
gst_tag_list_unref (entry->tags);
+#ifdef USE_POISONING
+ memset (entry, 0xff, sizeof (GstTocEntry));
+#endif
+
g_slice_free (GstTocEntry, entry);
}
g_hash_table_unref (uri->query);
g_free (uri->fragment);
+#ifdef USE_POISONING
+ memset (uri, 0xff, sizeof (*uri));
+#endif
+
g_slice_free1 (sizeof (*uri), uri);
}