From: Xiang, Haihao Date: Tue, 20 Nov 2018 06:21:54 +0000 (+0800) Subject: msdk: Close fd handle X-Git-Tag: 1.19.3~507^2~3782 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38cf42f90f59d97d381d500457f8dabf5ac6c921;p=platform%2Fupstream%2Fgstreamer.git msdk: Close fd handle Otherwise it will result in resource leak if mem == NULL --- diff --git a/sys/msdk/gstmsdkvideomemory.c b/sys/msdk/gstmsdkvideomemory.c index b9b4f9c..2648468 100644 --- 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; }