summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lirc/lirc_imon.c
diff options
context:
space:
mode:
authorJarod Wilson2011-01-17 20:02:00 +0100
committerMauro Carvalho Chehab2011-01-19 15:52:22 +0100
commit88914bdf8c677ebd7e797adac05e47303fd6ac77 (patch)
tree6ba8b683d9b19ee4d2d7aa0836b1f2cf7dc4d1f6 /drivers/staging/lirc/lirc_imon.c
parent[media] hdpvr: reduce latency of i2c read/write w/recycled buffer (diff)
downloadkernel-qcow2-linux-88914bdf8c677ebd7e797adac05e47303fd6ac77.tar.gz
kernel-qcow2-linux-88914bdf8c677ebd7e797adac05e47303fd6ac77.tar.xz
kernel-qcow2-linux-88914bdf8c677ebd7e797adac05e47303fd6ac77.zip
[media] staging/lirc: fix mem leaks and ptr err usage
When the lirc drivers were converted over to using memdup_user, I mistakenly also removed corresponding calls to kfree. Add those back. I also screwed up on the allocation error check in lirc_serial, using if (PTR_ERR()) instead of if (IS_ERR()), which broke transmit. Reported-by: Jiri Fojtasek <jiri.fojtasek@hlohovec.net> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/lirc/lirc_imon.c')
-rw-r--r--drivers/staging/lirc/lirc_imon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c
index 0da6b9518af9..235cab0eb087 100644
--- a/drivers/staging/lirc/lirc_imon.c
+++ b/drivers/staging/lirc/lirc_imon.c
@@ -447,6 +447,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
exit:
mutex_unlock(&context->ctx_lock);
+ kfree(data_buf);
return (!retval) ? n_bytes : retval;
}