diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index f047c5a7f64c1c35e7eed64b9818906e6f95885d..78d1aa5f7f9a600fd35950d9ee8c7e3562046a7b 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c @@ -465,6 +465,8 @@ static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size, sizeof(struct vmbus_channel_gpadl_header) + sizeof(struct gpa_range) + pageCount * sizeof(u64); msgHeader = kzalloc(msgSize, GFP_KERNEL); + if (msgHeader == NULL) + goto nomem; msgHeader->MessageSize = msgSize; gpaHeader = (struct vmbus_channel_gpadl_header *)msgHeader->Msg;