bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: found memory leak in ncurses-5.7 (again)


From: Thomas Dickey
Subject: Re: found memory leak in ncurses-5.7 (again)
Date: Wed, 25 Mar 2009 09:25:23 -0400 (EDT)

On Wed, 25 Mar 2009, Martin Ettl wrote:

Hello,

thanks for the response. I use this tool since some time and it has discovered a lots of sticky issues, i (really) never had been able to find without it :-).

no problem (report bugs)


Best regards

Ettl Martin

-------- Original-Nachricht --------
Datum: Tue, 24 Mar 2009 20:18:23 -0400 (EDT)
Von: Thomas Dickey <address@hidden>
An: Martin Ettl <address@hidden>
Betreff: Re: found memory leak in ncurses-5.7 (again)

On Wed, 25 Mar 2009, Martin Ettl wrote:

Hello,

i discovered an other issue using the static code analysis tool
cppcheck:

../cppcheck -q -f -a -j2 ncurses-5.7/
[ncurses-5.7/c++/cursesw.cc:301]: (all) Memory leak: W


the code, the tool complains about:

yes, I saw that too (experimented some with the tool, to see if it could
find other problems) it's not as obvious.

For the realloc's I'll have to work through the code and address the
issue.

(thanks)


int _nc_xx_ripoff_init(WINDOW *w, int ncols)
{
   int res = ERR;

   RIPOFFINIT init = *prip++;
   if (init) {
        NCursesWindow* W = new NCursesWindow(w,ncols);
        res = init(*W);
   }
   return res;
}

Best regards

Ettl Martin



-------- Original-Nachricht --------
Datum: Sun, 22 Mar 2009 18:20:21 -0400 (EDT)
Von: Thomas Dickey <address@hidden>
An: Martin Ettl <address@hidden>
CC: address@hidden
Betreff: Re: found memory leak in ncurses-5.7

On Sun, 22 Mar 2009, Martin Ettl wrote:

Hi friends,

i detected a memory leak in ncurses version 5.7. In file
ncurses-5.7/ncurses/base/safe_sprintf.c at line 115, the function will
return -1 without
freeing the memory, allocated to variabel 'format'.

The memory leak was detected by using the static code analysis tool
cppcheck. I used the following command:

cppcheck -q ncurses-5.7/
[ncurses-5.7/ncurses/base/safe_sprintf.c:115]: (error) Memory leak:
format

thanks (I added this to my to-do list last week)

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
allen: http://www.gmx.net/de/go/multimessenger01


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss 
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a


_______________________________________________
Bug-ncurses mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-ncurses


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]