protection from bad frees on unallocated strings

This commit is contained in:
Julien Sentier 2012-02-23 12:48:28 +01:00 committed by Robin Sommer
parent 2eeac54857
commit c2ee15b09f
2 changed files with 4 additions and 4 deletions

View file

@ -142,7 +142,7 @@ int TraceState::LogTrace(const char* fmt, ...)
if ( ! loc.filename )
{
loc.filename = "<no filename>";
loc.filename = copy_string("<no filename>");
loc.last_line = 0;
}
@ -735,7 +735,7 @@ string get_context_description(const Stmt* stmt, const Frame* frame)
loc = *stmt->GetLocationInfo();
else
{
loc.filename = "<no filename>";
loc.filename = copy_string("<no filename>");
loc.last_line = 0;
}