projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba623a7
)
HID: hidraw: free list for all error in hidraw_open
author
Amit Nagal
<helloin.amit@gmail.com>
Wed, 7 Sep 2011 11:48:47 +0000
(13:48 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Wed, 7 Sep 2011 11:48:47 +0000
(13:48 +0200)
In function hidraw_open struct hidraw_list *list should be freed for
all error conditions.
Signed-off-by: Amit Nagal <helloin.amit@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hidraw.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hidraw.c
b/drivers/hid/hidraw.c
index
c79578b
..
c841a8e
100644
(file)
--- a/
drivers/hid/hidraw.c
+++ b/
drivers/hid/hidraw.c
@@
-259,7
+259,6
@@
static int hidraw_open(struct inode *inode, struct file *file)
mutex_lock(&minors_lock);
if (!hidraw_table[minor]) {
- kfree(list);
err = -ENODEV;
goto out_unlock;
}
@@
-285,6
+284,8
@@
static int hidraw_open(struct inode *inode, struct file *file)
out_unlock:
mutex_unlock(&minors_lock);
out:
+ if (err < 0)
+ kfree(list);
return err;
}