Re: [libvirt] [PATCH 1/6] leaseshelper: store server_duid as an allocated string

2016-01-19 Thread Daniel P. Berrange
On Tue, Jan 19, 2016 at 10:54:00AM +0100, Ján Tomko wrote: > We either use the value from the environment variable, or learn it from > the existing lease file. > > In the second case, the pointer would be pointing into the JSON object > of the first lease with a DUID, owned by leases_array, then

[libvirt] [PATCH 1/6] leaseshelper: store server_duid as an allocated string

2016-01-19 Thread Ján Tomko
We either use the value from the environment variable, or learn it from the existing lease file. In the second case, the pointer would be pointing into the JSON object of the first lease with a DUID, owned by leases_array, then leases_array_new. Always allocate the string instead, making obvious