From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- util.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/util.c b/util.c index 38af6d5..6985a70 100644 --- a/util.c +++ b/util.c @@ -363,7 +363,7 @@ int enough_fd(int fd) struct mdu_array_info_s array; struct mdu_disk_info_s disk; int avail_disks = 0; - int i; + int i, rv; char *avail; if (ioctl(fd, GET_ARRAY_INFO, &array) != 0 || @@ -386,9 +386,10 @@ int enough_fd(int fd) avail[disk.raid_disk] = 1; } /* This is used on an active array, so assume it is clean */ - return enough(array.level, array.raid_disks, array.layout, - 1, - avail, avail_disks); + rv = enough(array.level, array.raid_disks, array.layout, + 1, avail, avail_disks); + free(avail); + return rv; } -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html