Permalink
Browse files

myfree_file_line no longer treats freeing a NULL pointer as an error

  • Loading branch information...
1 parent 546ea21 commit e2f09cf15088574177b005b49e68b0e0572df46c Tony Cook committed May 5, 2008
Showing with 3 additions and 0 deletions.
  1. +3 −0 io.c
View
3 io.c
@@ -190,6 +190,9 @@ myfree_file_line(void *p, char *file, int line) {
char *pp = p;
int match = 0;
int i;
+
+ if (p == NULL)
+ return;
for(i=0; i<MAXMAL; i++) if (malloc_pointers[i].ptr == p) {
mm_log((1,"myfree_file_line: pointer %i (%s) freed at %s (%i)\n", i, malloc_pointers[i].comm, file, line));

0 comments on commit e2f09cf

Please sign in to comment.