Re: [PATCH] kvm tool: Make kvm structure to carry name copy

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

 



On Fri, 3 Feb 2012, Cyrill Gorcunov wrote:
If guest name is used (which is default case) the kvm might end
up carrying the pointer to name which is allocated on stack.

kvm_cmd_run_init
 (on stack) default_name
 kvm__init(..., default_name)
   kvm->name = default_name

So I think better to allow kvm to carry own copy
of guest name. 64 symbols should be more than enough.

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---

I hope I didn't miss anything?

Can't we just use strdup()?

			Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux