remove stray tab
[mesa.git] / src / mesa / shader / slang / slang_compile_operation.c
index 192f2b086b604569fae554a71e9dc4cee24f2e63..c16ec7f80790209688db981a6da6ad9aee9be9a7 100644 (file)
@@ -60,8 +60,11 @@ slang_operation_destruct(slang_operation * oper)
    for (i = 0; i < oper->num_children; i++)
       slang_operation_destruct(oper->children + i);
    slang_alloc_free(oper->children);
+#ifdef FREE_MEMORY
+   /* XXX revisit and fix memory coruption here ! */
    slang_variable_scope_destruct(oper->locals);
    slang_alloc_free(oper->locals);
+#endif
    oper->children = NULL;
    oper->num_children = 0;
    oper->locals = NULL;
@@ -135,6 +138,17 @@ slang_operation_new(GLuint count)
 }
 
 
+/**
+ * Delete operation and all children
+ */
+void
+slang_operation_delete(slang_operation *oper)
+{
+   slang_operation_destruct(oper);
+   _mesa_free(oper);
+}
+
+
 slang_operation *
 slang_operation_grow(GLuint *numChildren, slang_operation **children)
 {