va: allocator: Fix an unmap typo in _va_copy.

No need to unmap the the src memory when failing to allocate the
dst mem. It has not been mapped yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2156>
This commit is contained in:
He Junyan 2021-04-13 15:42:09 +08:00
parent 39538adfd6
commit 9bcb18ebce

View file

@ -1389,7 +1389,6 @@ _va_copy (GstMemory * mem, gssize offset, gssize size)
copy = gst_va_allocator_alloc (mem->allocator); copy = gst_va_allocator_alloc (mem->allocator);
if (!copy) { if (!copy) {
GST_WARNING ("failed to allocate new memory"); GST_WARNING ("failed to allocate new memory");
gst_memory_unmap (mem, &sinfo);
return NULL; return NULL;
} }
} else { } else {