I would plan a maintenance release. I've also added a new feature to
'::rivet::var all' that allows an extra optional argument that is
interpreted as a dictionary of default values (in the same way the
'::rivet::var get' command has an optional default value argument).
That's why I noticed the memory leak. 

The code in the master branch has also new versions of the TEA tcl.m4
and install-sh scripts

  -- Massimo

On Mon, Feb 14, 2022 at 09:55:07AM -0500, Brice Hamon wrote:
> Thanks Massimo.
> Good catch.
> We will need to get a patch, or a maintenance release?
> 
> Thank you
> Brice.
> 
> On Mon, Feb 14, 2022 at 9:39 AM Massimo Manghi <mxman...@apache.org> wrote:
> 
> > I think I spotted a memory leak in function Rivet_Var
> > (src/mod_rivet_ng/rivetCore.c)
> >
> > Whenever one of the ::rivet::var forms 'var (all | list | names)' ('var
> > get' excluded) returns an empty string the result value is created calling
> >
> > result = Tcl_NewStringObj("",-1);
> >
> > in every case variable 'result' was already pointing to a Tcl_Obj
> > created at the beginning of the function, after the basic argument
> > checks are performed. The pointer to such object is lost and its memory
> > never freed (the function relies on Tcl_SetObjResult which internally
> > calls Tcl_IncrRefCount and Tcl_DecrRefCount)
> >
> >
> >   -- Massimo
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
> > For additional commands, e-mail: rivet-dev-h...@tcl.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to