From be5c60e3fb44c9ca8ae37c3f20e2ccb95ab5e8d3 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Tue, 1 Nov 2011 14:54:27 +1100 Subject: [PATCH] partition_try_spare() use closedir() to release DIR * returned by opendir() Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- Incremental.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Incremental.c b/Incremental.c index cedb7928..c2a89c0b 100644 --- a/Incremental.c +++ b/Incremental.c @@ -1121,6 +1121,8 @@ static int partition_try_spare(char *devname, int *dfdp, struct dev_policy *pol, close(fd); } + closedir(dir); + if (!chosen) return 1; -- 2.47.2