summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <[email protected]>2014-05-08 10:34:50 +0300
committerVille Syrjälä <[email protected]>2014-06-26 15:37:14 +0300
commitcc5abf046050b2a25c5f4966662d3388302b3cf2 (patch)
treedf4183113621eb48f1c178ba05ba6b384199b809
parent568c545b7ee732f32656f06a953af5a0887ff6b6 (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.c5
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;