Coverity: Resource leak: close fd before return

Anthony Youngman <anthony@youngman.org.uk>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Anthony Youngman 2018-06-15 22:36:42 +01:00 committed by Jes Sorensen
parent 29446c962f
commit d94eb07f82
1 changed files with 1 additions and 0 deletions

1
Grow.c
View File

@ -242,6 +242,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
if (st->ss->load_super(st, fd2, NULL)) {
pr_err("cannot find super block on %s\n", dv);
close(fd);
close(fd2);
return 1;
}
info.array.raid_disks = nd+1;