From 1297790591d76cdddc13d98c578b457dc24ae410 Mon Sep 17 00:00:00 2001 From: Adorjan White Date: Fri, 28 Nov 2025 17:48:28 +0000 Subject: [PATCH] tx_ring_buf not checked for successful allocation --- components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c b/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c index 631829de9e1d..e6abe60e8bb0 100644 --- a/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c +++ b/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag.c @@ -183,7 +183,7 @@ esp_err_t usb_serial_jtag_driver_install(usb_serial_jtag_driver_config_t *usb_se } p_usb_serial_jtag_obj->tx_ring_buf = xRingbufferCreate(usb_serial_jtag_config->tx_buffer_size, RINGBUF_TYPE_BYTEBUF); - if (p_usb_serial_jtag_obj->rx_ring_buf == NULL) { + if (p_usb_serial_jtag_obj->tx_ring_buf == NULL) { ESP_LOGE(USB_SERIAL_JTAG_TAG, "ringbuffer create error"); err = ESP_ERR_NO_MEM; goto _exit;