Skip to content

Commit

Permalink
Update inirw.cpp
Browse files Browse the repository at this point in the history
protect free memory many times
  • Loading branch information
huoyingyangjie authored Nov 24, 2016
1 parent 79f11e4 commit ab0fc75
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inirw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ void INIsword::release(){
vector<string *>::iterator iter;
for(iter=lines.begin();iter!=lines.end();iter++)
{
delete *iter;

if(*iter!=NULL)
delete *iter;
else
continue;
*iter=NULL;
}

}
Expand Down

0 comments on commit ab0fc75

Please sign in to comment.