Re: [PATCH] USB: fix possible memory leak in pxa27x_udc

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Monday, June 23, 2008 - 3:38 pm

On Sunday 22 June 2008, Marcin Slusarz wrote:


Correct enough as it goes, except that it *can't* be null by virtue
of how it's called.  See <include/linux/usb/gadget.h> for:

static inline struct usb_request *usb_ep_alloc_request(struct usb_ep *ep,
                                                       gfp_t gfp_flags)
{
        return ep->ops->alloc_request(ep, gfp_flags);
}

If it were null it couldn't get here.  A better fix would just
remove the null check here (and possibly elsewhere).

- Dave




--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] USB: fix possible memory leak in pxa27x_udc, Marcin Slusarz, (Sun Jun 22, 2:08 am)
Re: [PATCH] USB: fix possible memory leak in pxa27x_udc, David Brownell, (Mon Jun 23, 3:38 pm)