From 9ced55dd5642060f23b66816a3441a3e9ad5a3ed Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Thu, 8 Sep 2022 10:03:25 -0700 Subject: [PATCH] Improved njs_mp_free() to aling with free() semantics. Previously, njs_mp_free() issued an assertion when p == NULL, while NULL argument is explicitly allowed for free(). --- src/njs_mp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/njs_mp.c b/src/njs_mp.c index 27b24633..86b44d96 100644 --- a/src/njs_mp.c +++ b/src/njs_mp.c @@ -682,7 +682,7 @@ njs_mp_free(njs_mp_t *mp, void *p) } } else { - njs_assert_msg(0, "freed pointer is out of mp: %p\n", p); + njs_assert_msg(p == NULL, "freed pointer is out of mp: %p\n", p); } } -- 2.47.3