diff options
author | Brian Paul <[email protected]> | 2006-04-28 15:42:15 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-04-28 15:42:15 +0000 |
commit | 6a769d97e3ad0c5275f918b9f36519d6c0254da3 (patch) | |
tree | 7515c441cde6f3fbd1ab9d733c1bcf71531dc13d /src/mesa/shader/arbprogparse.c | |
parent | 49a80ca2bcca1c1d9c341c332c5a4b07b6b3b2fd (diff) |
fix second memory leak (bug 5557)
Diffstat (limited to 'src/mesa/shader/arbprogparse.c')
-rw-r--r-- | src/mesa/shader/arbprogparse.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index b52525e669f..b596b79bc79 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -518,7 +518,7 @@ typedef enum */ struct var_cache { - GLubyte *name; + const GLubyte *name; /* don't free() - no need */ var_type type; GLuint address_binding; /* The index of the address register we should * be using */ @@ -641,7 +641,7 @@ parse_string (GLubyte ** inst, struct var_cache **vc_head, *found = 0; var_cache_create (&va); - va->name = i; + va->name = (const GLubyte *) i; var_cache_append (vc_head, va); @@ -828,6 +828,7 @@ static GLuint parse_relative_offset (GLcontext *ctx, GLubyte **inst, struct arb_program *Program, GLint *offset) { + (void) ctx; *offset = parse_integer(inst, Program); return 0; } @@ -1936,7 +1937,7 @@ parse_param_use (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, /* First, insert a dummy entry into the var_cache */ var_cache_create (¶m_var); - param_var->name = (GLubyte *) _mesa_strdup (" "); + param_var->name = (const GLubyte *) " "; param_var->type = vt_param; param_var->param_binding_length = 0; @@ -2466,7 +2467,7 @@ parse_src_reg (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head, */ var_cache_create(&src); src->type = vt_attrib; - src->name = (GLubyte *)_mesa_strdup("Dummy Attrib Variable"); + src->name = (const GLubyte *) "Dummy Attrib Variable"; src->attrib_binding = binding; src->attrib_is_generic = is_generic; var_cache_append(vc_head, src); |