Message ID | 1484250369.5807.11.camel@HansenPartnership.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/char/tpm/tpms-dev.c b/drivers/char/tpm/tpms-dev.c index f4cb7a3..3eb5955 100644 --- a/drivers/char/tpm/tpms-dev.c +++ b/drivers/char/tpm/tpms-dev.c @@ -20,6 +20,11 @@ static int tpms_open(struct inode *inode, struct file *file) priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (priv == NULL) return -ENOMEM; + priv->space.context_buf = kzalloc(PAGE_SIZE, GFP_KERNEL); + if (priv->space.context_buf == NULL) { + kfree(priv); + return -ENOMEM; + } tpm_common_open(file, chip, &priv->priv);