We want to make sure that we never free a path that still references
a map. This error message will hopefully never be printed.

Signed-off-by: Martin Wilck <[email protected]>
---
 libmultipath/structs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index 29c0008..f441312 100644
--- a/libmultipath/structs.c
+++ b/libmultipath/structs.c
@@ -170,6 +170,9 @@ free_path (struct path * pp)
        if (!pp)
                return;
 
+       if (pp->mpp)
+               condlog(0, "%s: INTERNAL ERROR: path %s references a map",
+                       __func__, pp->dev_t);
        uninitialize_path(pp);
 
        if (pp->udev) {
-- 
2.52.0


Reply via email to