From ec9dd728aa00de692f4b003e12394aa9cdda9446 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 27 Jul 2021 15:36:48 +0200 Subject: [PATCH] cov: memleak dir descriptor opendir() missed closedir(). --- lib/device/dev-type.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c index 067a9ffad..89791bebe 100644 --- a/lib/device/dev-type.c +++ b/lib/device/dev-type.c @@ -180,6 +180,9 @@ int dev_is_used_by_active_lv(struct cmd_context *cmd, struct device *dev, int *u } } + if (closedir(d)) + log_sys_debug("closedir", holders_path); + if (used_by_lv_count) *used_by_lv_count = used_count; if (used_by_dm_name)