Commits

Lars Wassermann committed 2e1f503

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

Comments (0)

Files changed (1)

spyvm/interpreter_proxy.py

         try:
             module = dlopen(c_name)
         except DLOpenError, e:
+            rffi.free_charp(c_name)
             raise error.PrimitiveFailedError
+
         try:
             try:
                 _getModuleName = dlsym(module, "getModuleName")
         except error.PrimitiveFailedError:
             dlclose(module)
             raise
-
+        finally:
+            rffi.free_charp(c_name)
 
 IProxy = _InterpreterProxy()