> >> diff --git a/tools/virsh.c b/tools/virsh.c
> >> index dd916f3..c8ae9f2 100644
> >> --- a/tools/virsh.c
> >> +++ b/tools/virsh.c
> >> @@ -7139,6 +7139,8 @@ cleanup:
> >>      return ret;
> >>
> >>  no_memory:
> >> +    VIR_FREE(list);
> >> +    VIR_FREE(buffer);
> >>      vshError(ctl, "%s", _("Out of memory"));
> >>      ret = FALSE;
> >>      return ret;
> >
> > Actually that's not enough and it also duplicates code as all the cleanup 
> > code
> > is already there:
> 
> Indeed.
> The only piece of cleanup: code that is not needed
> on the current no_memory path is the freeing of "result".
> Plugging more leaks and avoiding duplication.
> Definite improvement.  ACK.

Thanks, pushed.

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

Reply via email to