mesa/main: Verify calloc return value in register_surface()
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
committed by
Ville Syrjälä
parent
568c545b7e
commit
cc5abf0460
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user