Permalink
Browse files

forgot the malloc'd directly option

  • Loading branch information...
1 parent d88407a commit e7d7b0ea49c8964b2d67ae2b01c6a28b6ab4c256 @jayridge committed Feb 29, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 simplequeue/region.c
View
7 simplequeue/region.c
@@ -85,8 +85,13 @@ void region_free(void *ptr)
TAILQ_REMOVE(&regions, reg, entries);
munmap((void *)reg, region_size);
}
- break;
+ return;
}
reg = TAILQ_NEXT(reg, entries);
}
+ /*
+ * This item is not within a region. Assume this was allocated via malloc.
+ *
+ */
+ free(ptr);
}

0 comments on commit e7d7b0e

Please sign in to comment.