Skip to content

Commit 865586f

Browse files
committed
DPL: fix small leak when receiving WS messages from the driver
Found while investigating something else. Does not affect online operations at all. Offline productions might have leaked a few kB per minute which was probably lost in the noise.
1 parent 9315c9e commit 865586f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Framework/Core/src/DPLWebSocket.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ struct GUIWebSocketHandler : public WebSocketHandler {
167167
}
168168
}
169169
}
170-
void endFragmentation() override{};
171-
void control(char const* frame, size_t s) override{};
172-
void beginChunk() override{};
173-
void endChunk() override{};
170+
void endFragmentation() override {};
171+
void control(char const* frame, size_t s) override {};
172+
void beginChunk() override {};
173+
void endChunk() override {};
174174

175175
/// The driver context were we want to accumulate changes
176176
/// which we got from the websocket.
@@ -415,6 +415,7 @@ void websocket_client_callback(uv_stream_t* stream, ssize_t nread, const uv_buf_
415415
try {
416416
LOG(debug) << "Data received from server";
417417
parse_http_request(buf->base, nread, context->client);
418+
free(buf->base);
418419
} catch (RuntimeErrorRef& ref) {
419420
auto& err = o2::framework::error_from_ref(ref);
420421
LOG(error) << "Error while parsing request: " << err.what;

0 commit comments

Comments
 (0)