aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chheap.c4
-rw-r--r--src/chmempools.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/chheap.c b/src/chheap.c
index 0cda7f268..f4c80314d 100644
--- a/src/chheap.c
+++ b/src/chheap.c
@@ -18,7 +18,7 @@
*/
/**
- * @addtogroup Memory
+ * @addtogroup Heap
* @{
*/
@@ -251,3 +251,5 @@ bool_t chHeapNotFragmented(void) {
#endif /* CH_USE_MALLOC_HEAP */
#endif /* CH_USE_HEAP */
+
+/** @} */
diff --git a/src/chmempools.c b/src/chmempools.c
index 49020d9b2..ae726122b 100644
--- a/src/chmempools.c
+++ b/src/chmempools.c
@@ -102,9 +102,10 @@ void chPoolFree(MemoryPool *mp, void *objp) {
* of objects.
*/
void chPoolRelease(MemoryPool *mp) {
+ void *p;
- while (mp->mp_next)
- chHeapFree(mp->mp_next);
+ while ((p = chPoolAlloc(mp, FALSE)) != NULL)
+ chHeapFree(p);
}
#endif