forked from Mirrors/btrfs-progs
btrfs-progs: don't double-close prg_fd
If scrub start discovers that scrub is already running, we need to set prg_fd to -1 before goto out, or we'll try to close it again in the error path. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Zach Brown <zab@redhat.com>master
parent
a70837ab1e
commit
6bd3a02fa6
|
@ -1192,6 +1192,7 @@ static int scrub_start(int argc, char **argv, int resume)
|
|||
/* ... yes, so scrub must be running. error out */
|
||||
fprintf(stderr, "ERROR: scrub already running\n");
|
||||
close(prg_fd);
|
||||
prg_fd = -1;
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue