This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Termios memory leak?
- From: John Paul King <jpking at advantexmail dot net>
- To: ecos-discuss at sources dot redhat dot com
- Date: Sun, 17 Jul 2005 16:27:34 -0500
- Subject: [ECOS] Termios memory leak?
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