Re: [PATCHv7 5/5] pathspec: allow querying for attributes

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

 



On Wed, May 18, 2016 at 12:02 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
>  void free_pathspec(struct pathspec *pathspec)
>  {
> +       int i, j;
> +       for (i = 0; i < pathspec->nr; i++) {
> +               for (j = 0; j < pathspec->items[j].attr_match_nr; j++)
> +                       free(pathspec->items[i].attr_match[j].value);
> +               free(pathspec->items[i].attr_match);
> +               git_attr_check_free(pathspec->items[i].attr_check);

This is faulty as may be NULL and git_attr_check_free assumes its
argument is not
NULL. So I'll add a guard here in a reoll.
--
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]