summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_mp.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-08-02 13:36:29 +0300
committerMax Romanov <max.romanov@nginx.com>2017-08-02 13:36:29 +0300
commitb150f07e801802124ca6f3b29b4b9f97aa68d52b (patch)
tree6dbf83af6b7e2787e0c918b0017765d074c70057 /src/nxt_mp.c
parentf23f985899760fafd853e993d9023b1339f09533 (diff)
downloadunit-b150f07e801802124ca6f3b29b4b9f97aa68d52b.tar.gz
unit-b150f07e801802124ca6f3b29b4b9f97aa68d52b.tar.bz2
Added basic port error handler.
Diffstat (limited to '')
-rw-r--r--src/nxt_mp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_mp.c b/src/nxt_mp.c
index 40d12be0..8c2da262 100644
--- a/src/nxt_mp.c
+++ b/src/nxt_mp.c
@@ -952,7 +952,9 @@ nxt_mp_retain(nxt_mp_t *mp, size_t size)
uint32_t
nxt_mp_release(nxt_mp_t *mp, void *p)
{
- nxt_mp_free(mp, p);
+ if (nxt_fast_path(p != NULL)) {
+ nxt_mp_free(mp, p);
+ }
mp->retain--;