[virt-tools-list] [vhostmd PATCH] fix deallocation

Jim Fehlig jfehlig at suse.com
Thu Jun 21 15:39:29 UTC 2018


I added a few words to the commit message.

On 06/21/2018 07:19 AM, Michael Trapp wrote:
> ---
>   vhostmd/virt-util.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/vhostmd/virt-util.c b/vhostmd/virt-util.c
> index 1c31305..b2b9670 100644
> --- a/vhostmd/virt-util.c
> +++ b/vhostmd/virt-util.c
> @@ -91,15 +91,17 @@ vu_vm *vu_get_vm(int id)
>   
>    error:
>      virDomainFree(dom);
> -   free(vm);
> +   vu_vm_free(vm);
>      return NULL;
>   }
>   
>   void vu_vm_free(vu_vm *vm)
>   {
>      if (vm) {
> -      free(vm->name);
> -      free(vm->uuid);
> +      if (vm->name)
> +         free(vm->name);
> +      if (vm->uuuid)

s/uuuid/uuid/

Fixed and pushed. Thanks!

Regards,
Jim




More information about the virt-tools-list mailing list