Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> --- mdadm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mdadm.c b/mdadm.c index d80aab3..7cdcdba 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); } -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html