summaryrefslogtreecommitdiff
path: root/src/i965_post_processing.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2015-09-07 15:21:49 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2015-09-15 10:11:10 +0800
commit4e434ef89683cdd5973e3413c5bf559d48125cd1 (patch)
treee2bbc49e6f263c6484bca40aa58814f99ad6d880 /src/i965_post_processing.c
parent1f2e87864a7e59c77fa25c912e8af2ea35177c11 (diff)
downloadlibva-intel-driver-4e434ef89683cdd5973e3413c5bf559d48125cd1.tar.gz
Check pointer returned from calloc()
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'src/i965_post_processing.c')
-rwxr-xr-xsrc/i965_post_processing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index 75b1514c..491234be 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -6075,6 +6075,9 @@ i965_proc_context_init(VADriverContextP ctx, struct object_config *obj_config)
struct intel_driver_data *intel = intel_driver_data(ctx);
struct i965_proc_context *proc_context = calloc(1, sizeof(struct i965_proc_context));
+ if (!proc_context)
+ return NULL;
+
proc_context->base.destroy = i965_proc_context_destroy;
proc_context->base.run = i965_proc_picture;
proc_context->base.batch = intel_batchbuffer_new(intel, I915_EXEC_RENDER, 0);