allocator: fix memory leak in _fallback_mem_copy

https://bugzilla.gnome.org/show_bug.cgi?id=686658
This commit is contained in:
Miguel Angel Cabrera Moya 2012-10-22 20:25:43 +02:00 committed by Tim-Philipp Müller
parent ef552507fa
commit 3ae671fb9b

View file

@ -106,6 +106,7 @@ _fallback_mem_copy (GstMemory * mem, gssize offset, gssize size)
copy = gst_allocator_alloc (mem->allocator, size, &params);
if (!gst_memory_map (copy, &dinfo, GST_MAP_WRITE)) {
GST_CAT_WARNING (GST_CAT_MEMORY, "could not write map memory %p", copy);
gst_allocator_free (mem->allocator, copy);
gst_memory_unmap (mem, &sinfo);
return NULL;
}