From d94eb07f82a7e9c086da23b31c8021107b60f884 Mon Sep 17 00:00:00 2001 From: Anthony Youngman Date: Fri, 15 Jun 2018 22:36:42 +0100 Subject: Coverity: Resource leak: close fd before return Anthony Youngman Signed-off-by: Jes Sorensen --- Grow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Grow.c b/Grow.c index a4be7e7b..30c5fa91 100644 --- a/Grow.c +++ b/Grow.c @@ -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; -- cgit v1.2.3