Commit 7874d1fe authored by Jack Jansen's avatar Jack Jansen

Fix NULL dereference in case of out-of-memory condition

parent f90a1131
......@@ -186,11 +186,12 @@ list_dealloc(op)
listobject *op;
{
int i;
for (i = 0; i < op->ob_size; i++) {
XDECREF(op->ob_item[i]);
}
if (op->ob_item != NULL)
if (op->ob_item != NULL) {
for (i = 0; i < op->ob_size; i++) {
XDECREF(op->ob_item[i]);
}
free((ANY *)op->ob_item);
}
free((ANY *)op);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment