[Mesa-dev] [PATCH 1/2] mesa: common/meta: avoid printing uninitialized bytes.

Oliver McFadden oliver.mcfadden at linux.intel.com
Sat May 26 00:22:16 PDT 2012


Mesa 8.1-devel implementation error: meta program compile failed:
��

Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/mesa/drivers/common/meta.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 95336fc..316d7b2 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -338,7 +338,7 @@ compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB
    if (size == 0)
       return 0;
 
-   info = malloc(size);
+   info = calloc(1, size);
    if (!info)
       return 0;
 
@@ -369,7 +369,7 @@ link_program_with_debug(struct gl_context *ctx, GLuint program)
    if (size == 0)
       return 0;
 
-   info = malloc(size);
+   info = calloc(1, size);
    if (!info)
       return 0;
 
-- 
1.7.8



More information about the mesa-dev mailing list