summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorXiao Ni <xni@redhat.com>2017-09-19 08:06:46 +0200
committerJes Sorensen <jsorensen@fb.com>2017-10-02 19:26:07 +0200
commit4dba4bd48f45a8df850ba3b37f3c2a5f178b163e (patch)
tree5e89b5e4cad0c16c10cccc49ed3295b4e57412e0 /mdadm.c
parentutil: Code is 80 characters wide (diff)
downloadmdadm-4dba4bd48f45a8df850ba3b37f3c2a5f178b163e.tar.xz
mdadm-4dba4bd48f45a8df850ba3b37f3c2a5f178b163e.zip
Close mdfd before returning main function
Signed-off-by: Xiao Ni <xni@redhat.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index d80aab36..7cdcdba7 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1734,6 +1734,8 @@ int main(int argc, char *argv[])
autodetect();
break;
}
+ if (mdfd > 0)
+ close(mdfd);
exit(rv);
}