From: Dmitry Volyntsev Date: Thu, 8 Sep 2022 17:03:25 +0000 (-0700) Subject: Improved njs_mp_free() to aling with free() semantics. X-Git-Tag: 0.7.8~32 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=9ced55dd5642060f23b66816a3441a3e9ad5a3ed;p=njs.git 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(). --- 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); } }