refs: fix memory leak when parsing hideRefs config