projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
568c545
)
mesa/main: Verify calloc return value in register_surface()
author
Juha-Pekka Heikkila
<juhapekka.heikkila@gmail.com>
Thu, 8 May 2014 07:34:50 +0000
(10:34 +0300)
committer
Ville Syrjälä
<ville.syrjala@linux.intel.com>
Thu, 26 Jun 2014 12:37:14 +0000
(15:37 +0300)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/vdpau.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/vdpau.c
b/src/mesa/main/vdpau.c
index d9745939391cf50a13ad2b7885039447be571598..f1b3eceee3166ce40045df530822b861873d92eb 100644
(file)
--- 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;