Call xmlFree on the node contents returned by xmlNodeGetContent, as the docs say to do.

<rdar://problem/14391836>

llvm-svn: 185996
This commit is contained in:
Jim Ingham 2013-07-10 02:21:57 +00:00
parent 2a6447320e
commit 9f35cfaf08
1 changed files with 4 additions and 0 deletions

View File

@ -232,6 +232,7 @@ SymbolVendorMacOSX::CreateInstance (const lldb::ModuleSP &module_sp, lldb_privat
if (node_content)
{
strncpy(DBGBuildSourcePath, node_content, sizeof(DBGBuildSourcePath));
xmlFree((void *) node_content);
}
}
key_node = value_node;
@ -251,11 +252,14 @@ SymbolVendorMacOSX::CreateInstance (const lldb::ModuleSP &module_sp, lldb_privat
{
FileSpec resolved_source_path(node_content, true);
resolved_source_path.GetPath(DBGSourcePath, sizeof(DBGSourcePath));
xmlFree ((void *) node_content);
}
}
key_node = value_node;
}
}
if (key_name != NULL)
xmlFree((void *) key_name);
}
}
}