On Mon, Apr 8, 2013 at 1:36 AM, Bjorn Lindgren <[email protected]> wrote: > > Ok, here's a new patch with only the Lib part. > > thanks, patch applied.
> Do it exist a generic destructor function for freeing mk_list's or > do one need to create a custom function to free up config->plugins? > > the mk_list is a generic implementation to link different nodes in a linked list, the only common pattern in the structure is the head entry. So do not exists a generic *destructor* for it as each structure is independent on its content. The only generic routines are: add to list (mk_list_add()), remove from from list (mk_list_del()), go around each linked (mk_list_foreach() or mk_list_foreach_safe()). Note: All *free* routines when exiting Monkey must be located inside the conditions "#ifdef SAFE_FREE..." regards, > Regards, > Bjorn > > > On Sat, 6 Apr 2013, Eduardo Silva wrote: > > the config->plugins is wrong, because config->plugins is a mk_list, that >> links "struct plugin" nodes. >> >> Please resubmit only for the Lib part. >> >> regards, >> >> >> On Sat, Apr 6, 2013 at 1:18 PM, Lauri Kasanen <[email protected]> wrote: >> >> On Sat, 6 Apr 2013 12:34:38 -0600 >>> Eduardo Silva <[email protected]> wrote: >>> >>> cc: Lauri >>>> On Sat, Apr 6, 2013 at 12:24 PM, Bjorn Lindgren <[email protected]> wrote: >>>> >>>> Hi Eduardo, >>>>> >>>>> I'm submitting a patch for two minor memory leaks I discovered in the >>>>> mk_lib. >>>>> >>>> >>> The part in mk_lib looks good. For the mk_config part, I'm not sure if >>> it's correct to free a mk_list with string_split_free. >>> >>> - Lauri >>> >>> >> >> >> -- >> Eduardo Silva >> http://edsiper.linuxchile.cl >> http://www.monkey-project.com >> > -- Eduardo Silva http://edsiper.linuxchile.cl http://www.monkey-project.com
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
