mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
Avoid assertion violation in case of kmm_free(NULL)
It is ok to call kmm_free with a NULL pointer. Thus adopt the DEBUGASSERT statement to cover this case. Signed-off-by: Michael Jung <michael.jung@secore.ly>
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
void kmm_free(FAR void *mem)
|
||||
{
|
||||
DEBUGASSERT(kmm_heapmember(mem));
|
||||
DEBUGASSERT((mem == NULL) || kmm_heapmember(mem));
|
||||
mm_free(g_kmmheap, mem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user