diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2009-02-01 11:54:54 -0500 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2009-02-01 11:54:54 -0500 |
commit | a59133d8bdb2418b45f95279ff00146363701a64 (patch) | |
tree | 3665ed8bb9df3b8de6cb98e9422ef997f03fd972 /dummy_drv_video | |
parent | 16a51b8c6c289211c3e991f06fbfb6c68d7ca19c (diff) | |
download | libva-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.c | 6 |
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])) |