msdk: Close fd handle

Otherwise it will result in resource leak if mem == NULL
This commit is contained in:
Xiang, Haihao 2018-11-20 14:21:54 +08:00 committed by Víctor Manuel Jáquez Leal
parent 24d5c9b200
commit 38cf42f90f

View file

@ -415,6 +415,7 @@ gst_msdk_dmabuf_memory_new_with_surface (GstAllocator * allocator,
mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
if (!mem) {
GST_ERROR ("failed ! dmabuf fd: %d", fd);
close (fd);
return NULL;
}