[pypy-svn] r45913 - pypy/branch/pypy-more-rtti-inprogress/module/thread
fijal at codespeak.net
fijal at codespeak.net
Wed Aug 22 17:50:04 CEST 2007
Author: fijal
Date: Wed Aug 22 17:50:03 2007
New Revision: 45913
Modified:
pypy/branch/pypy-more-rtti-inprogress/module/thread/ll_thread.py
Log:
avoid leaking in case of errors
Modified: pypy/branch/pypy-more-rtti-inprogress/module/thread/ll_thread.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/module/thread/ll_thread.py (original)
+++ pypy/branch/pypy-more-rtti-inprogress/module/thread/ll_thread.py Wed Aug 22 17:50:03 2007
@@ -48,6 +48,7 @@
ll_lock = lltype.malloc(TLOCKP.TO, flavor='raw')
res = c_thread_lock_init(ll_lock)
if res == -1:
+ lltype.free(ll_lock, flavor='raw')
raise error("out of resources")
return Lock(ll_lock)
More information about the Pypy-commit
mailing list