mirror of
https://github.com/open5gs/open5gs.git
synced 2026-04-26 10:30:41 +00:00
[metrics] fix memory leak
Each time Prometheus scraper queried the metrics, there was a memory leak. Depending on the amount of metrics, this could amount to some 5MB/h of memory leakage (in case of a scrape every 10 second).
This commit is contained in:
parent
84ffa55039
commit
22ba9685ee
1 changed files with 1 additions and 0 deletions
|
|
@ -295,6 +295,7 @@ mhd_server_access_handler(void *cls, struct MHD_Connection *connection,
|
|||
MHD_add_response_header(rsp, "Content-Type", "text/plain; version=0.0.4; charset=utf-8");
|
||||
ret = MHD_queue_response(connection, MHD_HTTP_OK, rsp);
|
||||
MHD_destroy_response(rsp);
|
||||
prom_free((void *)buf);
|
||||
return (_MHD_Result)ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue