Re: [PATCH] qemuDomainSnapshotCreateXML: Don't leak parsed snapshot definition

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

 



On Tue, May 14, 2019 at 03:52:07PM +0200, Michal Privoznik wrote:
> This function gets snapshot XML (provided by used) as an
> argument. It parses it into a local variable @def and then sets
> some more members (e.g. it creates a copy of live domain XML).
> Then it proceeds to checking if snapshot XML is valid (e.g. it
> contains as many disks as currently in the domain). If this fails
> then the control jumps to endjob label and subsequently return
> from the function. This is where AUTOFREE function for @def is
> ran. Well, because the code says to run plain VIR_FREE() we leak
> some memory because @def is actually an object and therefore
> it should have been declared as AUTOUNREF.
>
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

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