summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_unit.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-09-19 16:28:03 +0300
committerMax Romanov <max.romanov@nginx.com>2019-09-19 16:28:03 +0300
commit6346e641eef4aacf92e81e0f1ea4f42ed1e62834 (patch)
treeb94b5fe651a5eb4eb9b4f340286ab4ee95e053b8 /src/nxt_unit.c
parent1fac43eebe4136a2f57c56f23fc90a33783e63f2 (diff)
downloadunit-6346e641eef4aacf92e81e0f1ea4f42ed1e62834.tar.gz
unit-6346e641eef4aacf92e81e0f1ea4f42ed1e62834.tar.bz2
Releasing WebSocket frame in case of buffer allocation failure.
Found by Coverity (CID 349456).
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r--src/nxt_unit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c
index 9696e9cd..4497d09d 100644
--- a/src/nxt_unit.c
+++ b/src/nxt_unit.c
@@ -981,6 +981,8 @@ nxt_unit_process_websocket(nxt_unit_ctx_t *ctx, nxt_unit_recv_msg_t *recv_msg)
nxt_unit_alert(ctx, "#%"PRIu32": failed to allocate buf",
req_impl->stream);
+ nxt_unit_websocket_frame_release(&ws_impl->ws);
+
return NXT_UNIT_ERROR;
}