From: Jes Sorensen Date: Tue, 1 Nov 2011 03:54:27 +0000 (+1100) Subject: partition_try_spare() use closedir() to release DIR * returned by opendir() X-Git-Tag: mdadm-3.2.3~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be5c60e3fb44c9ca8ae37c3f20e2ccb95ab5e8d3;p=thirdparty%2Fmdadm.git partition_try_spare() use closedir() to release DIR * returned by opendir() Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- 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;