msdk: Close fd handle
Otherwise it will result in resource leak if mem == NULL
This commit is contained in:
parent
24d5c9b200
commit
38cf42f90f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user