Re: [PATCH] :V2 drivers/bluetooth/bpa10x.c: missing kfrees

From: Marcel Holtmann
Date: Sun Jun 12 2011 - 04:14:15 EST


Hi Connor,

> both bpa10x_submit_initr_urb() and bpa10x_submit_bulk_urb()
> malloc a char buffer(buf) for usb_fill_init_usb() but fail to
> free it after freeing the urb.

you do realize that URB_FREE_BUFFER flag is used?

> Likewise, bpa10x_send_frame() allocates a usb_ctrlrequest(dr)
> for sending packets but does not free it after the
> usb_fill_control_urb() call.

There is a kfree(urb->setup_packet) in the complete callback. So I am
not following where you would see a memory leak here.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/