Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r491:2e1f503bdb08
Date: 2013-07-05 23:59 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/2e1f503bdb08/

Log:    freeing the module and function names after sending them to i.a.
        dlsym

diff --git a/spyvm/interpreter_proxy.py b/spyvm/interpreter_proxy.py
--- a/spyvm/interpreter_proxy.py
+++ b/spyvm/interpreter_proxy.py
@@ -1091,7 +1091,9 @@
         try:
             module = dlopen(c_name)
         except DLOpenError, e:
+            rffi.free_charp(c_name)
             raise error.PrimitiveFailedError
+
         try:
             try:
                 _getModuleName = dlsym(module, "getModuleName")
@@ -1127,7 +1129,8 @@
         except error.PrimitiveFailedError:
             dlclose(module)
             raise
-
+        finally:
+            rffi.free_charp(c_name)
 
 IProxy = _InterpreterProxy()
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to