Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
pacemaker.32680
pacemaker#3332-0001-Low-tools-Fix-memory-leak-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker#3332-0001-Low-tools-Fix-memory-leak-in-crm_mon-with-HTML-outpu.patch of Package pacemaker.32680
From b8b531520b526f3d7c17cee4ac53d06e84ef6977 Mon Sep 17 00:00:00 2001 From: Reid Wahl <nrwahl@protonmail.com> Date: Tue, 23 Jan 2024 00:01:43 -0800 Subject: [PATCH] Low: tools: Fix memory leak in crm_mon with HTML output pcmk__itoa() allocates memory, which needs to be freed. Signed-off-by: Reid Wahl <nrwahl@protonmail.com> --- tools/crm_mon.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) Index: pacemaker-2.1.5+20221208.a3f44794f/tools/crm_mon.c =================================================================== --- pacemaker-2.1.5+20221208.a3f44794f.orig/tools/crm_mon.c +++ pacemaker-2.1.5+20221208.a3f44794f/tools/crm_mon.c @@ -1574,10 +1574,16 @@ main(int argc, char **argv) } } - if ((output_format == mon_output_html || output_format == mon_output_cgi) && - out->dest != stdout) { - pcmk__html_add_header("meta", "http-equiv", "refresh", "content", - pcmk__itoa(options.reconnect_ms / 1000), NULL); + if ((output_format == mon_output_html || output_format == mon_output_cgi) + && (out->dest != stdout)) { + + char *content = pcmk__itoa(options.reconnect_ms / 1000); + + pcmk__html_add_header("meta", + "http-equiv", "refresh", + "content", content, + NULL); + free(content); } #ifdef PCMK__COMPAT_2_0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor