Fix memory initialization issue
This commit is contained in:
parent
735ddef6ae
commit
410a24c0e8
1 changed files with 1 additions and 0 deletions
|
|
@ -584,6 +584,7 @@ static bool static_hid_handle_allocated = false;
|
|||
void *USBD_static_malloc(uint32_t size)
|
||||
{
|
||||
assert(!static_hid_handle_allocated);
|
||||
memset(&static_hid_handle, 0, sizeof(static_hid_handle));
|
||||
static_hid_handle_allocated = true;
|
||||
return &static_hid_handle;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue