mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
glu/sgi: Fix memory leak in gluScaleImage3D.
(cherry picked from commit b611f639b4)
This commit is contained in:
parent
fe38c16021
commit
6c1fc2b2a5
1 changed files with 2 additions and 0 deletions
|
|
@ -7384,6 +7384,8 @@ int gluScaleImage3D(GLenum format,
|
|||
afterImage = malloc(imageSize3D(widthOut, heightOut, depthOut, format,
|
||||
GL_UNSIGNED_SHORT));
|
||||
if (beforeImage == NULL || afterImage == NULL) {
|
||||
free(beforeImage);
|
||||
free(afterImage);
|
||||
return GLU_OUT_OF_MEMORY;
|
||||
}
|
||||
retrieveStoreModes3D(&psm);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue