commit | 8e4a663e1bee9482bf98a7e67e1980b1731147a2 | [log] [tgz] |
---|---|---|
author | Jean-Paul Calderone <exarkun@twistedmatrix.com> | Sun Mar 03 17:30:27 2013 -0800 |
committer | Jean-Paul Calderone <exarkun@twistedmatrix.com> | Sun Mar 03 17:30:27 2013 -0800 |
tree | a8774ec1fa7057d776c324a11bff7f6bef259b72 | |
parent | fd593128440cf00d8756d930b73f7a90072b34dc [diff] |
Only initialize the heap if setup succeeds
diff --git a/memdbg.py b/memdbg.py index 04f4bc8..e30b68c 100644 --- a/memdbg.py +++ b/memdbg.py
@@ -27,7 +27,6 @@ """, libraries=["crypto"]) C = _ffi.dlopen(None) -heap = {} verbose = False def log(s): @@ -77,5 +76,7 @@ if _api.CRYPTO_set_mem_functions(malloc, realloc, free): print 'Enabled memory debugging' + heap = {} else: print 'Failed to enable memory debugging' + heap = None