diff options
| author | sakumisu <[email protected]> | 2022-04-15 16:49:54 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2022-04-15 16:49:54 +0800 |
| commit | 9708f5142018cbdb9332dc5e32db204e2ad87ff2 (patch) | |
| tree | 624ef5c056b6b8abb0339e48a0ca3e4121e0ac5d /class | |
| parent | 97ddd9803aab218fd8008c80e3a2a69453f67aa7 (diff) | |
replace malloc with usb_malloc
Diffstat (limited to 'class')
| -rw-r--r-- | class/audio/usbd_audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/class/audio/usbd_audio.c b/class/audio/usbd_audio.c index 1d1d0c8e..30a265e6 100644 --- a/class/audio/usbd_audio.c +++ b/class/audio/usbd_audio.c @@ -415,7 +415,7 @@ void usbd_audio_add_entity(uint8_t entity_id, uint16_t bDescriptorSubtype) control->automatic_gain[ch] = 0; } #else - struct usbd_audio_attribute_control *control = malloc(sizeof(struct usbd_audio_attribute_control)); + struct usbd_audio_attribute_control *control = usb_malloc(sizeof(struct usbd_audio_attribute_control)); memset(control, 0, sizeof(struct usbd_audio_attribute_control)); for (uint8_t ch = 0; ch < CONFIG_USBDEV_AUDIO_MAX_CHANNEL; ch++) { control->volume.wNumSubRanges = 1; |
