OSDN Git Service
(root)
/
android-x86
/
hardware-intel-common-vaapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c39671
)
vme_context->private_enc_ctx: check null before dereference
author
U. Artie Eoff
<ullysses.a.eoff@intel.com>
Wed, 29 Nov 2017 19:06:13 +0000
(11:06 -0800)
committer
Xiang, Haihao
<haihao.xiang@intel.com>
Thu, 30 Nov 2017 19:10:49 +0000
(11:10 -0800)
Ensure priv_ctx is not null before dereferencing it.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
src/gen9_hevc_encoder.c
patch
|
blob
|
history
diff --git
a/src/gen9_hevc_encoder.c
b/src/gen9_hevc_encoder.c
index
80d9d9c
..
d0361cd
100644
(file)
--- a/
src/gen9_hevc_encoder.c
+++ b/
src/gen9_hevc_encoder.c
@@
-414,6
+414,9
@@
gen9_hevc_enc_free_resources(struct encoder_vme_mfc_context *vme_context)
priv_ctx = (struct gen9_hevc_encoder_context *)vme_context->private_enc_ctx;
+ if (!priv_ctx)
+ return;
+
i965_free_gpe_resource(&priv_ctx->res_brc_pic_states_write_buffer);
i965_free_gpe_resource(&priv_ctx->res_brc_history_buffer);
i965_free_gpe_resource(&priv_ctx->res_brc_intra_dist_buffer);