mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-28 13:05:33 +08:00
[driver/ringbuffer]illegal access to freed memory
This commit is contained in:
parent
bef1d55736
commit
e02d6e616b
@ -340,6 +340,7 @@ struct rt_ringbuffer* rt_ringbuffer_create(rt_uint16_t size)
|
|||||||
if (pool == RT_NULL)
|
if (pool == RT_NULL)
|
||||||
{
|
{
|
||||||
rt_free(rb);
|
rt_free(rb);
|
||||||
|
rb = RT_NULL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
rt_ringbuffer_init(rb, pool, size);
|
rt_ringbuffer_init(rb, pool, size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user