Releasing WebSocket frame in case of buffer allocation failure.
Found by Coverity (CID 349456).
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user