device-mapper-multipath/0050-multipathd-unwatch_all_dmevents-check-if-waiter-is-i.patch
Benjamin Marzinski 1dad67a5af device-mapper-multipath-0.8.5-1
Update Source to upstream version 0.8.5 plus post tag commits
  * Patches 0001-0102 are from
    https://github.com/openSUSE/multipath-tools/tree/queue and are
    already queued for upstream.
Rename files
  * Previous patches 0059-0068 are now patches 0103-0111
2021-01-19 18:06:09 -06:00

29 lines
797 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Wed, 23 Sep 2020 18:45:30 +0200
Subject: [PATCH] multipathd: unwatch_all_dmevents: check if waiter is
initialized
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/dmevents.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/multipathd/dmevents.c b/multipathd/dmevents.c
index b561cbfd..f52f5970 100644
--- a/multipathd/dmevents.c
+++ b/multipathd/dmevents.c
@@ -257,6 +257,8 @@ void unwatch_all_dmevents(void)
struct dev_event *dev_evt;
int i;
+ if (!waiter)
+ return;
pthread_mutex_lock(&waiter->events_lock);
vector_foreach_slot(waiter->events, dev_evt, i)
free(dev_evt);
--
2.17.2