stm32 usb feature report sending
USB works asynchronously. USBD_CtlSendData just saves a pointer to the buffer; the data gets actually read from memory and transmitted when the host asks for it.

So you have to ensure that the data is still available later. Use a static or global variable.