Compare commits
No commits in common. "c8" and "c8-beta" have entirely different histories.
@ -1,37 +0,0 @@
|
||||
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 5feb1e95..1d48b08d 100644
|
||||
--- a/libmultipath/foreign/nvme.c
|
||||
+++ b/libmultipath/foreign/nvme.c
|
||||
@@ -697,6 +697,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);
|
||||
@@ -704,8 +705,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,7 +1,7 @@
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.8.4
|
||||
Release: 42%{?dist}
|
||||
Release: 41%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -148,7 +148,6 @@ Patch00134: 0134-multipathd-handle-no-active-paths-in-update_map_pr.patch
|
||||
Patch00135: 0135-libmpathpersist-fix-resource-leak-in-update_map_pr.patch
|
||||
Patch00136: 0136-multipathd-Added-support-to-handle-FPIN-Li-events-fo.patch
|
||||
Patch00137: 0137-multipathd-Make-sure-to-disable-queueing-if-recovery.patch
|
||||
Patch00138: 0138-libmultipath-foreign-fix-memory-leak-in-nvme-foreign.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -353,10 +352,6 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Thu Jan 9 2025 Benjamin Marzinski <bmarzins@redhat.com> 0.8.4-42
|
||||
- Add 0138-libmultipath-foreign-fix-memory-leak-in-nvme-foreign.patch
|
||||
- Resolves: RHEL-72573
|
||||
|
||||
* Fri Jan 5 2024 Benjamin Marzinski <bmarzins@redhat.com> 0.8.4-41
|
||||
- Add 0137-multipathd-Make-sure-to-disable-queueing-if-recovery.patch
|
||||
- Resolves: RHEL-16563
|
||||
|
Loading…
Reference in New Issue
Block a user