Fix memory initialization issue

This commit is contained in:
jaseg 2020-12-24 16:03:29 +01:00
parent 735ddef6ae
commit 410a24c0e8

View file

@ -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;
}