summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-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 410d215a8d..5d80bc77c6 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;