Releasing WebSocket frame in case of buffer allocation failure.

Found by Coverity (CID 349456).
This commit is contained in:
Max Romanov
2019-09-19 16:28:03 +03:00
parent 1fac43eebe
commit 6346e641ee

View File

@@ -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", nxt_unit_alert(ctx, "#%"PRIu32": failed to allocate buf",
req_impl->stream); req_impl->stream);
nxt_unit_websocket_frame_release(&ws_impl->ws);
return NXT_UNIT_ERROR; return NXT_UNIT_ERROR;
} }