This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cstratak
Recipients cstratak
Date 2019-03-14.14:39:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552574375.17.0.27732361131.issue36289@roundup.psfhosted.org>
In-reply-to
Content
Coverity scan reports this for bufferedio.c :

Error: RESOURCE_LEAK (CWE-772): [#def23]
Python-2.7.15/Modules/_io/bufferedio.c:1353: alloc_fn: Storage is returned from allocation function "PyString_FromStringAndSize".
Python-2.7.15/Objects/stringobject.c:88:5: alloc_fn: Storage is returned from allocation function "PyObject_Malloc".
Python-2.7.15/Objects/obmalloc.c:982:5: alloc_fn: Storage is returned from allocation function "malloc".
Python-2.7.15/Objects/obmalloc.c:982:5: return_alloc_fn: Directly returning storage allocated by "malloc".
Python-2.7.15/Objects/stringobject.c:88:5: var_assign: Assigning: "op" = "PyObject_Malloc(37UL + size)".
Python-2.7.15/Objects/stringobject.c:111:5: return_alloc: Returning allocated memory "op".
Python-2.7.15/Modules/_io/bufferedio.c:1353: var_assign: Assigning: "data" = storage returned from "PyString_FromStringAndSize(self->buffer + self->pos, current_size)".
Python-2.7.15/Modules/_io/bufferedio.c:1366: leaked_storage: Variable "data" going out of scope leaks the storage it points to.
 1364|           if (res == NULL) {
 1365|               Py_DECREF(chunks);
 1366|->             return NULL;
 1367|           }
 1368|           Py_CLEAR(res);
History
Date User Action Args
2019-03-14 14:39:35cstrataksetrecipients: + cstratak
2019-03-14 14:39:35cstrataksetmessageid: <1552574375.17.0.27732361131.issue36289@roundup.psfhosted.org>
2019-03-14 14:39:35cstrataklinkissue36289 messages
2019-03-14 14:39:34cstratakcreate