diff options
author | Andrei Belov <defan@nginx.com> | 2020-08-13 19:28:27 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2020-08-13 19:28:27 +0300 |
commit | aff76e4f90b4e948c327ce2b021dc3203c33cbcd (patch) | |
tree | 5bd6ac3aa92683777548472984c209bf26d8a971 /src/nxt_conn_accept.c | |
parent | 04ce9f997e0e49e57ce4b5fc4aa98134232a1974 (diff) | |
parent | 6473d4b65a99aa10d509220fb99d8c4f65631ed0 (diff) | |
download | unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.gz unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.bz2 |
Merged with the default branch.1.19.0-1
Diffstat (limited to '')
-rw-r--r-- | src/nxt_conn_accept.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_conn_accept.c b/src/nxt_conn_accept.c index 6a89840c..77c44c58 100644 --- a/src/nxt_conn_accept.c +++ b/src/nxt_conn_accept.c @@ -98,7 +98,9 @@ nxt_conn_accept_alloc(nxt_task_t *task, nxt_listen_event_t *lev) if (nxt_fast_path(mp != NULL)) { c = nxt_conn_create(mp, lev->socket.task); if (nxt_slow_path(c == NULL)) { - goto fail; + nxt_mp_destroy(mp); + + return NULL; } c->socket.read_work_queue = lev->socket.read_work_queue; @@ -109,11 +111,9 @@ nxt_conn_accept_alloc(nxt_task_t *task, nxt_listen_event_t *lev) lev->next = c; return c; } - } - fail: - - nxt_mp_destroy(mp); + nxt_conn_free(task, c); + } } return NULL; |