Re: [libvirt PATCH 1/9] qemu: Use g_autofree in qemuMigrationSrcConnect

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

 



On Tue, Aug 25, 2020 at 07:47:07 +0200, Martin Kletzander wrote:
> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_migration.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 142faa2cf997..60ddfde65d46 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3369,7 +3369,7 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
>  {
>      virNetSocketPtr sock;
>      const char *host;
> -    char *port = NULL;
> +    g_autofree char *port = NULL;
>      int ret = -1;
>  
>      host = spec->dest.host.name;
> @@ -3400,7 +3400,6 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
>      ret = 0;
>  
>   cleanup:
> -    VIR_FREE(port);
>      if (ret < 0)
>          VIR_FORCE_CLOSE(spec->dest.fd.qemu);
>      return ret;

Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>




[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