Files
libvirt-cim/0004-memory-leaks.patch
Klaus Kämpf 2276b50922 - Update to version v0.6.3+git20230822.a5a073c:
* ci: lcitool: Maintain project package deps lists here
  * README: Update link to upstream repo and drop mailing list refernce
  * ci: refresh with latest lcitool manifest
  * ci: mark bleeding edge distros as allowing failures
  * configure: convert to using xz archives for dist
  * ci: refresh with lcitool manifest
  * Switch to new GitHub repo-lockdown configuration
  * ci: remove obsolete refresh script and documentation
  * ci: re-generate containers/gitlab config from manifest
  * ci: define a CI manifest file
- add 0005-include-stdlib.h.patch, 0006-drop-base_schema.patch
- drop f6b7eeaf.patch, upstream
- rename
  provider-reg.patch to 0001-provider-reg.patch
  automake.patch to 0002-automake.patch
  libvirt-cim-0.6.3-fix-bashisms.patch to 0003-fix-bashisms.patch
  memory_leaks.patch to 0004-memory-leaks.patch

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:wbem/libvirt-cim?expand=0&rev=36
2024-11-05 16:35:22 +00:00

58 lines
2.1 KiB
Diff

From d07f47b783e8de1a49a744354ef9744334906fa4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@gmail.com>
Date: Tue, 5 Nov 2024 17:19:57 +0100
Subject: [PATCH 4/6] memory leaks
Other asprintf memory leaks found. Forwarded upstream.
Author: Adam Majer <amajer@suse.de>
---
src/Virt_ComputerSystem.c | 2 ++
src/Virt_SettingsDefineCapabilities.c | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c
index da07f93..c6cbfd2 100644
--- a/src/Virt_ComputerSystem.c
+++ b/src/Virt_ComputerSystem.c
@@ -417,6 +417,8 @@ static int set_other_id_info(const CMPIBroker *broker,
CMPI_string);
}
+ free (model);
+
CMSetProperty(instance, "OtherIdentifyingInfo",
&id_info, CMPI_stringA);
diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c
index 85cb27a..9750217 100644
--- a/src/Virt_SettingsDefineCapabilities.c
+++ b/src/Virt_SettingsDefineCapabilities.c
@@ -1980,7 +1980,6 @@ static CMPIStatus set_input_props(const CMPIObjectPath *ref,
char *cap;
if (get_input_dev_caption(type, bus, &cap) != 1) {
- free(cap);
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
"Unable to build input caption");
@@ -1988,12 +1987,15 @@ static CMPIStatus set_input_props(const CMPIObjectPath *ref,
}
if (caption != NULL) {
- if (asprintf(&cap, "%s %s", caption, cap) == -1) {
+ char *old_cap = cap;
+ if (asprintf(&cap, "%s %s", caption, old_cap) == -1) {
+ free(old_cap);
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
"Unable to build input caption");
goto out;
}
+ free(old_cap);
}
inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_INPUT, DEVICE_RASD);
--
2.47.0