Re: [PATCH 03/42] rpc: Use g_autofree on virNetClientNewLibSSH2()

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

 



On Thu, Dec 19, 2019 at 8:00 PM Daniel Henrique Barboza
<danielhb413@xxxxxxxxx> wrote:
>
>
>
> On 12/19/19 7:04 AM, Fabiano Fidêncio wrote:
> > Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
> > ---
> >   src/rpc/virnetclient.c | 18 ++++++------------
> >   1 file changed, 6 insertions(+), 12 deletions(-)
> >
> [...]
>
> >       if (knownHostsPath) {
> > @@ -517,12 +517,6 @@ virNetClientPtr virNetClientNewLibSSH2(const char *host,
> >           goto cleanup;
> >
> >    cleanup:
> > -    VIR_FREE(command);
> > -    VIR_FREE(privkey);
> > -    VIR_FREE(knownhosts);
> > -    VIR_FREE(homedir);
> > -    VIR_FREE(confdir);
> > -    VIR_FREE(nc);
> >       return ret;
> >
>
> This will leave a now unneeded 'cleanup' label:
>
>   cleanup:
>      return ret;
>
>
> In a quick glance at the patch series I noticed that Patch 41 also leaves
> an unused 'cleanup' label as well after the changes.

Daniel,

Please, take a look at the no_memory label. It calls the cleanup one.

Best Regards,
-- 
Fabiano Fidêncio


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux