Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

Memory leaks when function returns directly on failure without decreasing the refcnt of a new reference (static analyzer reports)

Open Snape3058 opened this issue 3 years ago • 0 comments

New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imaging.c#L4253 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imaging.c#L4256 Internal Report ID: 3fa97f


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingft.c#L1071 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingft.c#L1077 Internal Report ID: 60bc38


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingft.c#L1114 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingft.c#L1128 Internal Report ID: 775d14


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingft.c#L1118 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingft.c#L1128 Internal Report ID: 379efb


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingmorph.c#L138 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingmorph.c#L142 Internal Report ID: 8cc0d2


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingmorph.c#L215 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingmorph.c#L220 Internal Report ID: 239db5


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingtk.c#L77 Function returns without decreasing the refcnt (when ?: operator takes the false branch). https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_imagingtk.c#L78 Internal Report ID: bc9c58


New reference is returned here: https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_webp.c#L984 Function returns without decreasing the refcnt. https://github.com/python-pillow/Pillow/blob/68e39cba431680105c0e0f1a54371b7028e8da9a/src/_webp.c#L986 Internal Report ID: e4ed93

Snape3058 avatar May 23 '22 09:05 Snape3058