Memory leak fix.
This commit is contained in:
parent
af04c5a7ef
commit
bc8ef3b0bc
|
@ -314,6 +314,11 @@ static void loadFighters(cJSON *node)
|
|||
|
||||
node = node->next;
|
||||
|
||||
for (i = 0 ; i < numTypes ; i++)
|
||||
{
|
||||
free(types[i]);
|
||||
}
|
||||
|
||||
free(types);
|
||||
}
|
||||
}
|
||||
|
@ -419,6 +424,11 @@ static void loadCapitalShips(cJSON *node)
|
|||
|
||||
node = node->next;
|
||||
|
||||
for (i = 0 ; i < numTypes ; i++)
|
||||
{
|
||||
free(types[i]);
|
||||
}
|
||||
|
||||
free(types);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue