[ECOS] Termios memory leak?

John Paul King jpking@advantexmail.net
Sun Jul 17 21:34:00 GMT 2005


I've been using eCos w/ termios serial ports, and it seems that each 
open/close of such devices allocates memory that is never freed.  Struct 
termios_private_info has a member 'errbuf' that is malloc'd in function 
'real_termios_init' (packages/io/serial/src/common/termiostty.c), but I 
never see a corrseponding 'free'.  I grep'd through the source, and I 
haven't seen any actions taken on 'errbuf' (other than allocation within 
termiostty), so is it even used in eCos?  I have temporarily removed the 
few lines that deal w/ 'errbuf', and my application seems to work 
properly now, but is this a safe thing to do?

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list