Re: [PATCH] qedr: fix resource leak in qedr_create_qp

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

 



Hi,

Thank you for your comment.
I will re-label the goto statements and post the patch as version 2.

Thanks,
Keita

2020年9月10日(木) 22:24 Markus Elfring <Markus.Elfring@xxxxxx>:
>
> > Fix this by adding a new goto label that calls qedr_free_qp_resources.
>
> …
> > +++ b/drivers/infiniband/hw/qedr/verbs.c
> …
> > @@ -2165,11 +2187,13 @@ struct ib_qp *qedr_create_qp(struct ib_pd *ibpd,
> …
> >       return &qp->ibqp;
> >
> > +err2:
> > +     qedr_free_qp_resources(dev, qp, udata);
> >  err:
> >       kfree(qp);
>
> I propose to choose further alternatives for numbered labels.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=7fe10096c1508c7f033d34d0741809f8eecc1ed4#n485
>
> Regards,
> Markus




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux