Procházet zdrojové kódy

[driver/ringbuffer]illegal access to freed memory

misonyo před 7 roky
rodič
revize
e02d6e616b
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      components/drivers/src/ringbuffer.c

+ 1 - 0
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);