Re: [PATCH] config: free resources of `struct config_store_data`

2018-05-13 Thread Eric Sunshine
On Sun, May 13, 2018 at 5:58 AM, Martin Ågren wrote: > On 13 May 2018 at 10:59, Eric Sunshine wrote: >> On Sun, May 13, 2018 at 4:23 AM Martin Ågren wrote: >>> Introduce and use a small helper function

Re: [PATCH] config: free resources of `struct config_store_data`

2018-05-13 Thread Martin Ågren
On 13 May 2018 at 10:23, Martin Ågren wrote: > +void config_store_data_clear(struct config_store_data *store) I will do s/void/static void/ here...

Re: [PATCH] config: free resources of `struct config_store_data`

2018-05-13 Thread Martin Ågren
On 13 May 2018 at 10:59, Eric Sunshine wrote: > On Sun, May 13, 2018 at 4:23 AM Martin Ågren wrote: > >> Introduce and use a small helper function `config_store_data_clear()` to >> plug these leaks. This should be safe. The memory tracked here is

Re: [PATCH] config: free resources of `struct config_store_data`

2018-05-13 Thread Eric Sunshine
On Sun, May 13, 2018 at 4:23 AM Martin Ågren wrote: > Commit fee8572c6d (config: avoid using the global variable `store`, > 2018-04-09) dropped the staticness of a certain struct, instead letting > the users create an instance on the stack and pass around a pointer. > We

[PATCH] config: free resources of `struct config_store_data`

2018-05-13 Thread Martin Ågren
Commit fee8572c6d (config: avoid using the global variable `store`, 2018-04-09) dropped the staticness of a certain struct, instead letting the users create an instance on the stack and pass around a pointer. We do not free the memory that the struct tracks. When the struct was static, the memory