Hey, I've stumbled across a possible memory leak - not sure whether it's intentional or not - It appears as if the free_cfg() library function neglects to free the yy_buffer_stack global variable. I externed the cfg_yylex_destroy() function and used it straight after calling to free_cfg() and the memory leak was gone.