pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/bf2e2f9bdf3366abf6004cad2cc46782d8b31367

faa60c69660fa.css" /> Issue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock… · python/cpython@bf2e2f9 · GitHub
Skip to content

Commit bf2e2f9

Browse files
committed
Issue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
(MemoryError).
1 parent 3f15cf0 commit bf2e2f9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/zlibmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ newcompobject(PyTypeObject *type)
132132
}
133133
#ifdef WITH_THREAD
134134
self->lock = PyThread_allocate_lock();
135+
if (self->lock == NULL) {
136+
PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock");
137+
return NULL;
138+
}
135139
#endif
136140
return self;
137141
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy