diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-05-08 10:34:50 +0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2014-06-26 15:37:14 +0300 |
commit | cc5abf046050b2a25c5f4966662d3388302b3cf2 (patch) | |
tree | df4183113621eb48f1c178ba05ba6b384199b809 | |
parent | 568c545b7ee732f32656f06a953af5a0887ff6b6 (diff) |
mesa/main: Verify calloc return value in register_surface()
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r-- | src/mesa/main/vdpau.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c index d9745939391..f1b3eceee31 100644 --- a/src/mesa/main/vdpau.c +++ b/src/mesa/main/vdpau.c @@ -132,6 +132,11 @@ register_surface(struct gl_context *ctx, GLboolean isOutput, } surf = CALLOC_STRUCT( vdp_surface ); + if (surf == NULL) { + _mesa_error_no_memory("VDPAURegisterSurfaceNV"); + return (GLintptr)NULL; + } + surf->vdpSurface = vdpSurface; surf->target = target; surf->access = GL_READ_WRITE; |