Re: [PATCHv2 3/4] bundle: don't leak an fd in case of early return

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

 



On Wed, Mar 30, 2016 at 10:41 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>> -       else if (ref_count < 0)
>> -               return -1;
>> +       else if (ref_count < 0) {
>> +               if (!bundle_to_stdout)
>> +                       close(bundle_fd);
>
> Why is this close() here considering that it gets closed by the 'err' path?

Thanks for pointing out; fixed in a reroll.
--
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]