summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--progs/trivial/tri.c17
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c4
2 files changed, 9 insertions, 12 deletions
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c
index aa45adb6c2..d3c6b59ea5 100644
--- a/progs/trivial/tri.c
+++ b/progs/trivial/tri.c
@@ -57,16 +57,13 @@ static void Reshape(int width, int height)
static void Key(unsigned char key, int x, int y)
{
-
- switch (key) {
- case 27:
- glutDestroyWindow(win);
- exit(0);
- default:
- return;
- }
-
- glutPostRedisplay();
+ switch (key) {
+ case 27:
+ exit(0);
+ default:
+ glutPostRedisplay();
+ return;
+ }
}
static void Draw(void)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index acaf1de882..d08229b57a 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -156,7 +156,7 @@ st_FreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
}
if (texImage->Data) {
- free(texImage->Data);
+ _mesa_align_free(texImage->Data);
texImage->Data = NULL;
}
}
@@ -541,7 +541,7 @@ st_TexImage(GLcontext * ctx,
sizeInBytes = depth * dstRowStride * postConvHeight;
}
- texImage->Data = malloc(sizeInBytes);
+ texImage->Data = _mesa_align_malloc(sizeInBytes, 16);
}
if (!texImage->Data) {