After looking at the sources, I noticed that the pointer given to free won't be set to NULL after being freed, so that pretty much explains the problem.
So my request is to fix that up. Here's the patch
Code: Select all
$ svn diff
Index: alloc.c
===================================================================
--- alloc.c (revision 1847)
+++ alloc.c (working copy)
@@ -415,6 +415,7 @@
}
_pspsdk_alloc_unlock();
+ ptr = NULL;
return;
}
@@ -446,6 +447,7 @@
cur->prev->next = cur->next;
_pspsdk_alloc_unlock();
+ ptr = NULL;
}
#endif
PS: I know it's not best programming style to not know exactly which pointers were already freed and not, but sometimes after a lot of coding you don't have the overlook and just want to get sure and then will get shot because of this :P