lkml.org 
[lkml]   [2007]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH][hid] Fix a NULL pointer dereference when we fail to allocate memory
    Jesper Juhl napsal(a):
    > drivers/hid/usbhid/hid-core.c | 3 ++-
    > 1 files changed, 2 insertions(+), 1 deletions(-)
    >
    > diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
    > index b2baeae..3ff7468 100644
    > --- a/drivers/hid/usbhid/hid-core.c
    > +++ b/drivers/hid/usbhid/hid-core.c
    > @@ -743,7 +743,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
    > hid->quirks = quirks;
    >
    > if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))

    Out of curiosity, where is this freed?

    --
    Jiri Slaby (jirislaby@gmail.com)
    Faculty of Informatics, Masaryk University
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-07-22 07:49    [W:0.020 / U:147.924 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site