Add reference to <stdbool.h> for C compilers
fix memory leak