Fix misc. Coverity warnings

This commit is contained in:
Jon Siwek 2019-08-14 16:18:44 -07:00
parent 47235b57a6
commit 6255ab6584
5 changed files with 13 additions and 12 deletions

View file

@ -171,10 +171,9 @@ ID* install_ID(const char* name, const char* module_name,
else
scope = SCOPE_FUNCTION;
string full_name_str = make_full_var_name(module_name, name);
char* full_name = copy_string(full_name_str.c_str());
string full_name = make_full_var_name(module_name, name);
ID* id = new ID(full_name, scope, is_export);
ID* id = new ID(full_name.data(), scope, is_export);
if ( SCOPE_FUNCTION != scope )
global_scope()->Insert(full_name, id);
else