mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
msdk: Close fd handle
Otherwise it will result in resource leak if mem == NULL
This commit is contained in:
parent
24d5c9b200
commit
38cf42f90f
1 changed files with 1 additions and 0 deletions
|
@ -415,6 +415,7 @@ gst_msdk_dmabuf_memory_new_with_surface (GstAllocator * allocator,
|
||||||
mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
|
mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
|
||||||
if (!mem) {
|
if (!mem) {
|
||||||
GST_ERROR ("failed ! dmabuf fd: %d", fd);
|
GST_ERROR ("failed ! dmabuf fd: %d", fd);
|
||||||
|
close (fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue