memory leak [was: debian.s390 problem]

David Relson relson at osagesoftware.com
Thu Mar 27 21:07:01 CET 2003


At 02:54 PM 3/27/03, Dan Deward wrote:

>Hi,
>
>I noticed that the method that method word_new does one xmalloc, and
>word_free does one xfree, but word_dup does two xmalloc's.  Wouldn't this
>case a memory leak when word_free is used on a word that was word_dup'ed?
>These three methods are in word.c
>
>Dan

Dan,

Good eye!  It _does_ look like you've found a problem.  Since bogofilter 
currently runs as needed, any memory allocation mistakes are cleaned up by 
the OS when it exits.  So, this flaw is not _presently_ a big 
problem.  However, it shouldn't be present.  Now, I have to figure out the 
best fix ...

Thanks for reporting it.

David






More information about the bogofilter-dev mailing list