summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-19 15:28:42 -0600
committerBrian <brian@yutani.localnet.net>2007-04-21 10:05:05 -0600
commitf2346498aacdfc3e574fed43e0fe13ad3f8e2a2d (patch)
treeb607298a2b2e9fe1e4b7ca6505506c41e3d90300 /src/mesa/shader/slang
parent4b7c6fc5a655bfb8f165cb94521bc49521303a35 (diff)
fix memleak in slang_operation_insert()
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c
index 410d215a8d4..5d80bc77c64 100644
--- a/src/mesa/shader/slang/slang_compile_operation.c
+++ b/src/mesa/shader/slang/slang_compile_operation.c
@@ -205,6 +205,8 @@ slang_operation_insert(GLuint *numChildren, slang_operation **children,
*children = NULL;
return NULL;
}
+ if (*children)
+ _mesa_free(*children);
*children = ops;
(*numChildren)++;
return newOp;