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:
parent
29446c962f
commit
d94eb07f82
1
Grow.c
1
Grow.c
|
@ -242,6 +242,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
|
||||||
if (st->ss->load_super(st, fd2, NULL)) {
|
if (st->ss->load_super(st, fd2, NULL)) {
|
||||||
pr_err("cannot find super block on %s\n", dv);
|
pr_err("cannot find super block on %s\n", dv);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
close(fd2);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
info.array.raid_disks = nd+1;
|
info.array.raid_disks = nd+1;
|
||||||
|
|
Loading…
Reference in New Issue