summaryrefslogtreecommitdiff
path: root/components/drivers/src
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/src')
-rw-r--r--components/drivers/src/ringbuffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/drivers/src/ringbuffer.c b/components/drivers/src/ringbuffer.c
index 2e078ae053..0acdbbd38c 100644
--- a/components/drivers/src/ringbuffer.c
+++ b/components/drivers/src/ringbuffer.c
@@ -340,6 +340,7 @@ struct rt_ringbuffer* rt_ringbuffer_create(rt_uint16_t size)
if (pool == RT_NULL)
{
rt_free(rb);
+ rb = RT_NULL;
goto exit;
}
rt_ringbuffer_init(rb, pool, size);