Fixed crash/freeze bug in compiler where free was being used on a bad pointer (was an oversight when adding deprecation support for macros)
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401273
This commit is contained in:
parent
c9adfc56ec
commit
fb2e5dc142
@ -62,6 +62,7 @@ static stringpair *insert_stringpair(stringpair *root,char *first,char *second,i
|
|||||||
cur->first=duplicatestring(first);
|
cur->first=duplicatestring(first);
|
||||||
cur->second=duplicatestring(second);
|
cur->second=duplicatestring(second);
|
||||||
cur->matchlength=matchlength;
|
cur->matchlength=matchlength;
|
||||||
|
cur->documentation=NULL;
|
||||||
if (cur->first==NULL || cur->second==NULL) {
|
if (cur->first==NULL || cur->second==NULL) {
|
||||||
if (cur->first!=NULL)
|
if (cur->first!=NULL)
|
||||||
free(cur->first);
|
free(cur->first);
|
||||||
@ -343,6 +344,11 @@ SC_FUNC int delete_subst(char *name,int length)
|
|||||||
item=find_stringpair(item,name,length);
|
item=find_stringpair(item,name,length);
|
||||||
if (item==NULL)
|
if (item==NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (item->documentation)
|
||||||
|
{
|
||||||
|
free(item->documentation);
|
||||||
|
item->documentation=NULL;
|
||||||
|
}
|
||||||
delete_stringpair(&substpair,item);
|
delete_stringpair(&substpair,item);
|
||||||
adjustindex(*name);
|
adjustindex(*name);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user