aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/texobj.c3
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index cfaac64bf..97bef3543 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -567,7 +567,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
GLint i;
const GLint minLevel = baseLevel;
const GLint maxLevel = t->_MaxLevel;
- GLuint width, height, depth, face, numFaces = 1;
+ const GLuint numFaces = t->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+ GLuint width, height, depth, face;
if (minLevel > maxLevel) {
incomplete(t, BASE, "minLevel > maxLevel");
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index 991df7896..da41ee84c 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -905,8 +905,10 @@ _mesa_get_uniform_location(struct gl_context *ctx,
name_copy[i-1] = '\0';
offset = strtol(&name[i], NULL, 10);
- if (offset < 0)
+ if (offset < 0) {
+ free(name_copy);
return -1;
+ }
array_lookup = true;
} else {