summaryrefslogtreecommitdiffstats
path: root/drivers/char/selection.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-02-03 15:19:23 +0000
committerSteve French <sfrench@us.ibm.com>2009-02-03 15:19:23 +0000
commite1f81c8a417be466e85a38b61679aa6860ec7331 (patch)
tree749815f74bfad330e83560a10fd5da5fc4d8c765 /drivers/char/selection.c
parent0e2bedaa394f74fa9f75ee937488c33d90039b5a (diff)
parentb1792e367053968f2ddb48bc911d314143ce6242 (diff)
downloadop-kernel-dev-e1f81c8a417be466e85a38b61679aa6860ec7331.zip
op-kernel-dev-e1f81c8a417be466e85a38b61679aa6860ec7331.tar.gz
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/selection.c')
-rw-r--r--drivers/char/selection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/selection.c b/drivers/char/selection.c
index f29fbe9..cb8ca56 100644
--- a/drivers/char/selection.c
+++ b/drivers/char/selection.c
@@ -268,7 +268,7 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t
/* Allocate a new buffer before freeing the old one ... */
multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */
- bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL);
+ bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL);
if (!bp) {
printk(KERN_WARNING "selection: kmalloc() failed\n");
clear_selection();
OpenPOWER on IntegriCloud