src/parsetree.c
// Free entire parse tree, using this node as the root
Free entire parse tree, using this node as the root
Free entire parse tree using this node as the root
void FreeTree(struct tree_node* pNode)
{
	if (pNode != NULL)
	{
		int i;
		FreeTree(pNode->pNextStatement);
		for (i = 0; i < pNode->numOperands; i++)
			FreeTree(pNode->operands[i]);
		free(pNode->operands);
		if (pNode->sval != NULL)
			free(pNode->sval);
		free(pNode);
	}
}
void FreeTree ( struct tree_node * pNode ) { if ( pNode != NULL ) { int i ; FreeTree ( pNode -> pNextStatement ) ; for ( i = 0 ; i < pNode -> numOperands ; i ++ ) FreeTree ( pNode -> operands [ i ] ) ; free ( pNode -> operands ) ; if ( pNode -> sval != NULL ) free ( pNode -> sval ) ; free ( pNode ) ; } }
Free entire parse tree, using this node as the root
Free entire parse tree using this node as the root
// Recursively free any non-NULL operands