projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24d5c9b
)
msdk: Close fd handle
author
Xiang, Haihao
<haihao.xiang@intel.com>
Tue, 20 Nov 2018 06:21:54 +0000
(14:21 +0800)
committer
Víctor Manuel Jáquez Leal
<vjaquez@igalia.com>
Mon, 26 Nov 2018 16:13:44 +0000
(16:13 +0000)
Otherwise it will result in resource leak if mem == NULL
sys/msdk/gstmsdkvideomemory.c
patch
|
blob
|
history
diff --git
a/sys/msdk/gstmsdkvideomemory.c
b/sys/msdk/gstmsdkvideomemory.c
index
b9b4f9c
..
2648468
100644
(file)
--- a/
sys/msdk/gstmsdkvideomemory.c
+++ b/
sys/msdk/gstmsdkvideomemory.c
@@
-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;
}