diff options
-rw-r--r-- | rtl-alloc-heap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rtl-alloc-heap.c b/rtl-alloc-heap.c index 1f3c8dd..44a4816 100644 --- a/rtl-alloc-heap.c +++ b/rtl-alloc-heap.c @@ -26,5 +26,8 @@ rtems_rtl_alloc_heap (bool allocate, if (allocate) *address = malloc (size); else + { free (*address); + *address = NULL; + } } |