You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/01/13 23:46:37 UTC

[lucy-commits] svn commit: r1058770 - /incubator/lucy/trunk/core/Lucy/Analysis/Stopalizer.c

Author: marvin
Date: Thu Jan 13 22:46:37 2011
New Revision: 1058770

URL: http://svn.apache.org/viewvc?rev=1058770&view=rev
Log:
Fix a refcounting error leading to a memory leak in Stopalizer.

Modified:
    incubator/lucy/trunk/core/Lucy/Analysis/Stopalizer.c

Modified: incubator/lucy/trunk/core/Lucy/Analysis/Stopalizer.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Analysis/Stopalizer.c?rev=1058770&r1=1058769&r2=1058770&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Analysis/Stopalizer.c (original)
+++ incubator/lucy/trunk/core/Lucy/Analysis/Stopalizer.c Thu Jan 13 22:46:37 2011
@@ -117,6 +117,7 @@ Stopalizer_gen_stoplist(const CharBuf *l
         char *word = (char*)words[i];
         ViewCharBuf *stop = ViewCB_new_from_trusted_utf8(word, strlen(word));
         NoCloneHash_Store(stoplist, (Obj*)stop, INCREF(&EMPTY));
+        DECREF(stop);
     }
     DECREF(lang);
     return (Hash*)stoplist;