'avail' is dynamically allocated, so it should be freed. Signed-off-by: Lukasz Dorau <lukasz.dorau@xxxxxxxxx> --- Manage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Manage.c b/Manage.c index afa9b42..910caa6 100644 --- a/Manage.c +++ b/Manage.c @@ -853,6 +853,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv, } array_failed = !enough(array->level, array->raid_disks, array->layout, 1, avail); + free(avail); } else array_failed = 0; if (array_failed) { -- 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