From a96667b970a2373fd96aa3ea171f0d323c763d58 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 23 May 2018 00:17:25 +0200 Subject: [PATCH] websocket: fix possible memory leak --- lib/nodes/websocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nodes/websocket.c b/lib/nodes/websocket.c index 5994faf28..0cfd7e0cc 100644 --- a/lib/nodes/websocket.c +++ b/lib/nodes/websocket.c @@ -81,7 +81,7 @@ static int websocket_connection_write(struct websocket_connection *c, struct sam if (pushed < cnt) warn("Queue overrun in WebSocket connection: %s", websocket_connection_name(c)); - sample_get_many(smps, cnt); + sample_get_many(smps, pushed); debug(LOG_WEBSOCKET | 10, "Enqueued %u samples to %s", pushed, websocket_connection_name(c));