Re: [vhostmd PATCH] fix deallocation

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

 



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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux