patacongo edited a comment on issue #1481:
URL: 
https://github.com/apache/incubator-nuttx/issues/1481#issuecomment-668724072


   This Issue cannot be closed yet.  Additional calls to malloc()/zalloc() were 
found in the OS. 
   
   Memory is never free.  Possible memory leak:
   
       ./boards/arm/cxd56xx/common/src/cxd56_crashdump.c:  pdump = 
malloc(sizeof(fullcontext_t));
   
   Memory allocated with malloc(), but freed with kmm_free():
   
       ./drivers/usbhost/usbhost_composite.c:  cfgbuffer = (FAR uint8_t 
*)malloc(CUSTOM_CONFIG_BUFSIZE);
   
   Memory is never freed in these cases.  It is allocated in the driver 
initialization logic, but there is no corresponding uninitialization logic; 
memory is not freed on error conditions:
   
       ./arch/arm/src/lc823450/lc823450_i2s.c:  priv = (struct lc823450_i2s_s 
*)zalloc(sizeof(struct lc823450_i2s_s));
       ./arch/arm/src/sam34/sam_spi.c:  spics = (struct sam_spics_s 
*)zalloc(sizeof(struct sam_spics_s));
       ./arch/arm/src/sama5/sam_spi.c:  spics = (struct sam_spics_s 
*)zalloc(sizeof(struct sam_spics_s));
       ./arch/arm/src/samv7/sam_spi.c:  spics = (struct sam_spics_s 
*)zalloc(sizeof(struct sam_spics_s));
   
   Memory is allocated with zalloc() but freed on error conditions with 
kmm_free():
   
       ./arch/arm/src/sama5/sam_ssc.c:  priv = (struct sam_ssc_s 
*)zalloc(sizeof(struct sam_ssc_s));
       ./arch/arm/src/samv7/sam_ssc.c:  priv = (struct sam_ssc_s 
*)zalloc(sizeof(struct sam_ssc_s));
       ./arch/arm/src/stm32/stm32_i2s.c:  priv = (struct stm32_i2s_s 
*)zalloc(sizeof(struct stm32_i2s_s));
   
   Memory is never freed:
   
       ./drivers/spi/spi_bitbang.c:  priv = (FAR struct spi_bitbang_s 
*)zalloc(sizeof(struct spi_bitbang_s));
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to