summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDikshita Agarwal <dikshita@codeaurora.org>2019-09-05 13:03:38 +0530
committerDikshita Agarwal <dikshita@codeaurora.org>2020-01-13 22:42:06 +0530
commit0d12af6d37a0217126e445f7e088b77dc74d7825 (patch)
treed92db347e9c544ab1478116bf4d825351f758b36
parent0336e3913daae6f2708ea5d29a42f980afdcd224 (diff)
downloadmedia-0d12af6d37a0217126e445f7e088b77dc74d7825.tar.gz
mm-video: vdec: avoid closing same fd twice
When freeing the buffer, same fd is being close twice which might result into crash if some other program start using the fd and we will end up closing a fd used by some other thread or program. this change will avoid closing the same fd twice. Change-Id: I037358a4a1e02a2cc6c52740ae44bbc8f080dc4c
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
index ae84116c..e4a37a44 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
@@ -1,7 +1,7 @@
/**
* @copyright
*
- * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -4810,7 +4810,6 @@ void omx_swvdec::ion_memory_free(struct vdec_ion *p_ion_buf_info)
(unsigned int)p_ion_buf_info->alloc_data.heap_id_mask);
if (p_ion_buf_info->data_fd >= 0) {
- close(p_ion_buf_info->data_fd);
p_ion_buf_info->data_fd = -1;
}