diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2011-11-01 04:54:27 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-11-01 04:54:27 +0100 |
commit | be5c60e3fb44c9ca8ae37c3f20e2ccb95ab5e8d3 (patch) | |
tree | 41338d864e386f101ed3cbf3401ddd07cb856141 /Incremental.c | |
parent | Fix memory leak of 'st3' in array_try_spare() (diff) | |
download | mdadm-be5c60e3fb44c9ca8ae37c3f20e2ccb95ab5e8d3.tar.xz mdadm-be5c60e3fb44c9ca8ae37c3f20e2ccb95ab5e8d3.zip |
partition_try_spare() use closedir() to release DIR * returned by opendir()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |