]> git.ipfire.org Git - thirdparty/libvirt.git/commit
leaseshelper: store server_duid as an allocated string
authorJán Tomko <jtomko@redhat.com>
Fri, 15 Jan 2016 13:36:45 +0000 (14:36 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 20 Jan 2016 08:33:44 +0000 (09:33 +0100)
commit9e7e7662bfe8b5637702844727c4f6484554b257
tree26713c486b2447cd98dd764945027d04102fd3df
parentdf9fe124d650bc438c531673492569da87523d20
leaseshelper: store server_duid as an allocated string

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 who should free the
string.
src/network/leaseshelper.c