[cppcheck] Fixed memleak (exception unfree)