mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-26 16:12:34 +00:00
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>
This commit is contained in:
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
Block a user