Re: [PATCH 1/6] conf: Plug memory leak on virDomainDefParseXML() error path

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

 



On 11/29/2011 10:57 PM, ajia@xxxxxxxxxx wrote:
> From: Alex Jia <ajia@xxxxxxxxxx>
> 
> Detected by Coverity. Leak introduced in commit 0873b68.
> 
> Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index d50a5c7..1559de2 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -7468,6 +7468,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
>              if (i != 0) {
>                  virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>                                       _("Only the first console can be a serial port"));
> +                virDomainChrDefFree(chr);
>                  goto error;

ACK and pushed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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