[Bug 779247] Fix race in videotexturecache

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Mar 4 10:01:57 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=779247

--- Comment #7 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 347194:
 --> (https://bugzilla.gnome.org/review?bug=779247&attachment=347194)

::: sys/applemedia/videotexturecache.m
@@ +140,3 @@
+    CFRelease(data->texture);
+    CFRelease(data->cache);
+    free(data);

Must be g_free() (changed before merging)

GLib allows to replace the malloc/free/calloc functions with something else,
e.g. for debugging purposes. Not that anybody is ever going to do that on
iOS...

@@ +194,3 @@

+success: {
+  TextureWrapper *texture_data = g_malloc(sizeof(TextureWrapper));

Changed to g_new(TextureWrapper, 1) which ensures that you don't accidentally
allocate with the size of type A and assign that to a pointer to type B.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list