fix a potential underflow and plug a memory leak

This commit is contained in:
Bill Currie 2002-12-18 20:53:49 +00:00
parent 637de7b687
commit c85fd3bd56

View file

@ -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);