mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-03 08:25:07 +02:00
freeMagic1() idiom insertion at all sites reported by static code analysis
This commit is contained in:
committed by
R. Timothy Edwards
parent
c74215ad55
commit
9489b23985
@@ -126,12 +126,14 @@ DBTechInitPlane(void)
|
||||
{
|
||||
NameList *tbl;
|
||||
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (tbl = dbPlaneNameLists.sn_next; tbl != &dbPlaneNameLists;
|
||||
tbl = tbl->sn_next)
|
||||
{
|
||||
freeMagic(tbl->sn_name);
|
||||
freeMagic(tbl);
|
||||
freeMagic1(&mm1, tbl);
|
||||
}
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
|
||||
/* Tables of short names */
|
||||
@@ -205,12 +207,14 @@ DBTechInitType()
|
||||
{
|
||||
NameList *tbl;
|
||||
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (tbl = dbTypeNameLists.sn_next; tbl != &dbTypeNameLists;
|
||||
tbl = tbl->sn_next)
|
||||
{
|
||||
freeMagic(tbl->sn_name);
|
||||
freeMagic(tbl);
|
||||
freeMagic1(&mm1, tbl);
|
||||
}
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
|
||||
/* Tables of short names */
|
||||
|
||||
Reference in New Issue
Block a user