Skip to content

Commit

Permalink
avoid memory leak in symbol table
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzmazur committed Feb 23, 2018
1 parent 400600d commit c4ac156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cyacas/libyacas/src/lisphash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const LispString* LispHashTable::LookUp(const std::string& s)
return i->second;

LispString* ls = new LispString(s);
ls->iReferenceCount = 1;
ls->iReferenceCount = 0;

return _rep.insert(std::make_pair(s, ls)).first->second;
}
Expand Down

0 comments on commit c4ac156

Please sign in to comment.