device-mapper-multipath-0.9.9-6
Add 0017-libmultipath-foreign-fix-memory-leak-in-nvme-foreign.patch Resolves: RHEL-73410
This commit is contained in:
parent
6007b6a467
commit
743bc74362
@ -0,0 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Mon, 6 Jan 2025 19:57:53 -0500
|
||||
Subject: [PATCH] libmultipath/foreign: fix memory leak in nvme foreign handler
|
||||
|
||||
_find_controllers() needs to free the udev device if it doesn't get
|
||||
added to a path.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/foreign/nvme.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c
|
||||
index 6f2d8800..235306ff 100644
|
||||
--- a/libmultipath/foreign/nvme.c
|
||||
+++ b/libmultipath/foreign/nvme.c
|
||||
@@ -708,6 +708,7 @@ static void _find_controllers(struct context *ctx, struct nvme_map *map)
|
||||
path = _find_path_by_syspath(map,
|
||||
udev_device_get_syspath(udev));
|
||||
if (path != NULL) {
|
||||
+ udev_device_unref(udev);
|
||||
path->seen = true;
|
||||
condlog(4, "%s: %s already known",
|
||||
__func__, fn);
|
||||
@@ -715,8 +716,10 @@ static void _find_controllers(struct context *ctx, struct nvme_map *map)
|
||||
}
|
||||
|
||||
path = calloc(1, sizeof(*path));
|
||||
- if (path == NULL)
|
||||
+ if (path == NULL) {
|
||||
+ udev_device_unref(udev);
|
||||
continue;
|
||||
+ }
|
||||
|
||||
path->gen.ops = &nvme_path_ops;
|
||||
path->udev = udev;
|
@ -1,6 +1,6 @@
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.9.9
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -26,6 +26,7 @@ Patch0013: 0013-RH-compile-with-libreadline-support.patch
|
||||
Patch0014: 0014-RH-Add-mpathcleanup.patch
|
||||
Patch0015: 0015-libmultipath-fix-ontap-prioritizer-snprintf-limits.patch
|
||||
Patch0016: 0016-multipathd-checker-port_state-before-setting-it.patch
|
||||
Patch0017: 0017-libmultipath-foreign-fix-memory-leak-in-nvme-foreign.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -235,6 +236,10 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Thu Jan 9 2025 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.9-6
|
||||
- Add 0017-libmultipath-foreign-fix-memory-leak-in-nvme-foreign.patch
|
||||
- Resolves: RHEL-73410
|
||||
|
||||
* Mon Nov 11 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.9-5
|
||||
- Add 0016-multipathd-checker-port_state-before-setting-it.patch
|
||||
- Resolves: RHEL-53995
|
||||
|
Loading…
Reference in New Issue
Block a user