Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r76324:96a3f1b070d8
Date: 2015-03-11 12:40 +0200
http://bitbucket.org/pypy/pypy/changeset/96a3f1b070d8/
Log: (arigo, fijal) free(NULL) should work and not do anything
diff --git a/rpython/translator/c/src/mem.c b/rpython/translator/c/src/mem.c
--- a/rpython/translator/c/src/mem.c
+++ b/rpython/translator/c/src/mem.c
@@ -29,6 +29,8 @@
RPY_EXTERN
void pypy_debug_alloc_stop(void *addr)
{
+ if (!addr)
+ return;
struct pypy_debug_alloc_s **p;
for (p = &pypy_debug_alloc_list; *p; p = &((*p)->next))
if ((*p)->addr == addr)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit