Re: [PATCH 2/3] pack-redundant: free all memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 16, 2016 at 11:22 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
> ---
> diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
> @@ -223,6 +223,18 @@ static inline size_t pack_list_size(struct pack_list *pl)
> +static inline void pack_list_free(struct pack_list *pl)

s/inline//

> +{
> +       struct pack_list *cur_pl;

You can declare this within the scope of the while-loop.

> +       while (pl) {
> +               llist_free(pl->unique_objects);
> +               llist_free(pl->all_objects);
> +               cur_pl = pl;
> +               pl = pl->next;
> +               free(cur_pl);
> +       }
> +}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]