From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- Incremental.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/Incremental.c b/Incremental.c index c21c971..35f0ce7 100644 --- a/Incremental.c +++ b/Incremental.c @@ -756,6 +756,10 @@ static int count_active(struct supertype *st, struct mdinfo *sra, best = calloc(raid_disks, sizeof(int)); devmap = calloc(raid_disks * numdevs, 1); + if (!best || !devmap) { + fprintf(stderr, Name ": out of memory.\n"); + exit(1); + } st->ss->getinfo_super(st, &info, devmap); } -- 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