summaryrefslogtreecommitdiffstats
path: root/Documentation/x86_64/machinecheck
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2007-07-30 15:15:26 +0200
committerJiri Kosina <jkosina@suse.cz>2007-08-02 13:48:03 +0200
commitde1a7b03282310d143cb0add74e909daffedda01 (patch)
treeb65e3873d4805595a242257d06524982e960edb2 /Documentation/x86_64/machinecheck
parentUSB HID: add ASUS LCM to the blacklist (diff)
downloadlinux-de1a7b03282310d143cb0add74e909daffedda01.tar.xz
linux-de1a7b03282310d143cb0add74e909daffedda01.zip
USB HID: fix a possible NULL pointer dereference when we fail to allocate memory
If, in usb_hid_configure(), we fail to allocate storage for 'usbhid', "if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))", then we'll jump to the 'fail:' label where we have this code: usb_free_urb(usbhid->urbin); usb_free_urb(usbhid->urbout); usb_free_urb(usbhid->urbctrl); Since we got here because we couldn't allocate storage for 'usbhid', what we have here is a NULL pointer dereference - ouch... This patch solves that little problem by adding a new 'fail_no_usbhid:' label after the problematic calls to usb_free_urb() and jumps to that one instead, in the problem case. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/x86_64/machinecheck')
0 files changed, 0 insertions, 0 deletions