diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 8990d8076e7da0733d7c8bb0a8b32fa55908af2d..19762f3476aadd22289d4ddb4a44d82985465bf4 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -103,8 +103,10 @@ vmcp_write(struct file *file, const char __user * buff, size_t count, } cmd[count] = '\0'; session = (struct vmcp_session *)file->private_data; - if (down_interruptible(&session->mutex)) + if (down_interruptible(&session->mutex)) { + kfree(cmd); return -ERESTARTSYS; + } if (!session->response) session->response = (char *)__get_free_pages(GFP_KERNEL | __GFP_REPEAT | GFP_DMA,