On 2016-09-13 16:25, Reiner Herrmann wrote:
> The counter is incremented during section allocation, but never
> decremented.
> 
> Signed-off-by: Reiner Herrmann <rei...@reiner-h.de>
> ---
>  list.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/list.c b/list.c
> index 321861c..a2be150 100644
> --- a/list.c
> +++ b/list.c
> @@ -213,6 +213,7 @@ uci_free_section(struct uci_section *s)
>       if ((s->type != uci_dataptr(s)) &&
>               (s->type != NULL))
>               free(s->type);
> +     s->package->n_section--;
NACK. n_section is used for hashing only, decrementing it here probably
makes collisions for anonymous sections more likely.

- Felix

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to