mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
fix a potential underflow and plug a memory leak
This commit is contained in:
parent
637de7b687
commit
c85fd3bd56
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,7 @@ PL_FreeItem (plitem_t *item)
|
|||
case QFArray: {
|
||||
int i = ((plarray_t *) item->data)->numvals;
|
||||
|
||||
while (--i) {
|
||||
while (i-- > 0) {
|
||||
PL_FreeItem (((plarray_t *) item->data)->values[i]);
|
||||
}
|
||||
free (item->data);
|
||||
|
@ -387,6 +387,7 @@ PL_ParsePropertyListItem (pldata_t *pl)
|
|||
}
|
||||
|
||||
k->key = (char *) key->data;
|
||||
free (key);
|
||||
k->value = value;
|
||||
|
||||
Hash_Add (dict, k);
|
||||
|
|
Loading…
Reference in a new issue