Commit af8f7c43 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Dispose the memory allocated for the demangled id.

parent c11447f1
......@@ -51,9 +51,13 @@ bool ASTDump::preVisit(AST *ast)
{
const char *id = typeid(*ast).name();
#ifdef Q_CC_GNU
id = abi::__cxa_demangle(id, 0, 0, 0);
char *cppId = abi::__cxa_demangle(id, 0, 0, 0);
id = cppId;
#endif
out << QByteArray(_depth, ' ') << id << endl;
#ifdef Q_CC_GNU
free(cppId);
#endif
++_depth;
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment