Merge pull request #1179 from uestczyh222/master
[Components][Drivers][USB]fix memory leak
This commit is contained in:
commit
0d7a74cc3d
|
@ -486,7 +486,10 @@ static rt_err_t _function_enable(ufunction_t func)
|
|||
//
|
||||
// _vcom_reset_state(func);
|
||||
//
|
||||
if(data->ep_out->buffer == RT_NULL)
|
||||
{
|
||||
data->ep_out->buffer = rt_malloc(HID_RX_BUFSIZE);
|
||||
}
|
||||
data->ep_out->request.buffer = data->ep_out->buffer;
|
||||
data->ep_out->request.size = EP_MAXPACKET(data->ep_out);
|
||||
data->ep_out->request.req_type = UIO_REQUEST_READ_BEST;
|
||||
|
|
Loading…
Reference in New Issue