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 > >