summaryrefslogtreecommitdiff
path: root/dummy_drv_video
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-02-01 11:54:54 -0500
committerAustin Yuan <shengquan.yuan@intel.com>2009-02-01 11:54:54 -0500
commita59133d8bdb2418b45f95279ff00146363701a64 (patch)
tree3665ed8bb9df3b8de6cb98e9422ef997f03fd972 /dummy_drv_video
parent16a51b8c6c289211c3e991f06fbfb6c68d7ca19c (diff)
downloadlibva-a59133d8bdb2418b45f95279ff00146363701a64.tar.gz
Fixed issues reported by Klockwork
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'dummy_drv_video')
-rw-r--r--dummy_drv_video/dummy_drv_video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c
index 3ba1ee9..bc2ea2a 100644
--- a/dummy_drv_video/dummy_drv_video.c
+++ b/dummy_drv_video/dummy_drv_video.c
@@ -736,6 +736,12 @@ VAStatus dummy_CreateContext(
obj_context->picture_height = picture_height;
obj_context->num_render_targets = num_render_targets;
obj_context->render_targets = (VASurfaceID *) malloc(num_render_targets * sizeof(VASurfaceID));
+ if (obj_context->render_targets == NULL)
+ {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ return vaStatus;
+ }
+
for(i = 0; i < num_render_targets; i++)
{
if (NULL == SURFACE(render_targets[i]))