Re: [PATCH 1/3] refs: push lock management into packed backend

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

 



On Tue, Sep 19, 2023 at 12:46 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> This looks a bit more convoluted than necessary.  Is it the same as
>
>         if (refs->be->transaction_begin &&
>             refs->be->transaction_begin(refs, tr, err))
>                 FREE_AND_NULL(tr);

Changed this in the next version.

> > +                     /* TODO: leaks on error path. */
> > +                     ref_transaction_free(packed_transaction);
> > +                     packed_transaction = NULL;
> > +                     backend_data->packed_transaction = NULL;
> > +             } else {
>
> If it were just a matter of flipping the early return and freeing of
> the transaction before going to clean-up, then that would have been
> less effort than leaving the TODO: comment.  What other things are
> needed to plug this leak?

you're not missing something. I didn't have enough time yesterday to
look into all the details.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Liana Sebastian




[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]

  Powered by Linux