Skip to content

Commit a291c8f

Browse files
committed
Fix reference leak.
1 parent d1cd4d4 commit a291c8f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/arraymodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,7 @@ array_tofile(arrayobject *self, PyObject *f)
12581258
Py_DECREF(bytes);
12591259
if (res == NULL)
12601260
return NULL;
1261+
Py_DECREF(res); /* drop write result */
12611262
}
12621263

12631264
done:

0 commit comments

Comments
 (0)