Re: [libvirt] [PATCH] cpu conf: Use virBufferFreeAndReset instead of virBufferContentAndReset and VIR_FREE

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

 



On Thu, Feb 04, 2010 at 04:43:26PM +0100, Matthias Bolte wrote:
> ---
>  src/conf/cpu_conf.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
> index e7924c1..244d670 100644
> --- a/src/conf/cpu_conf.c
> +++ b/src/conf/cpu_conf.c
> @@ -249,7 +249,6 @@ virCPUDefFormat(virConnectPtr conn,
>                  int flags)
>  {
>      virBuffer buf = VIR_BUFFER_INITIALIZER;
> -    char *tmp;
>  
>      if (virCPUDefFormatBuf(conn, &buf, def, indent, flags) < 0)
>          goto cleanup;
> @@ -262,8 +261,7 @@ virCPUDefFormat(virConnectPtr conn,
>  no_memory:
>      virReportOOMError(conn);
>  cleanup:
> -    tmp = virBufferContentAndReset(&buf);
> -    VIR_FREE(tmp);
> +    virBufferFreeAndReset(&buf);
>      return NULL;
>  }

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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