mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: do not steal pointers from the pool source
Since commit fcbbb28 we steal the pointer to the storage pool
source name if there was no pool name specified.
Properly duplicate the string to avoid freeing it twice.
https://bugzilla.redhat.com/show_bug.cgi?id=1436400
This commit is contained in:
19
tests/storagepoolxml2xmlout/pool-logical-noname.xml
Normal file
19
tests/storagepoolxml2xmlout/pool-logical-noname.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<pool type='logical'>
|
||||
<name>zily</name>
|
||||
<uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid>
|
||||
<capacity unit='bytes'>0</capacity>
|
||||
<allocation unit='bytes'>0</allocation>
|
||||
<available unit='bytes'>0</available>
|
||||
<source>
|
||||
<name>zily</name>
|
||||
<format type='lvm2'/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/zily</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
||||
@@ -79,6 +79,7 @@ mymain(void)
|
||||
DO_TEST("pool-logical");
|
||||
DO_TEST("pool-logical-nopath");
|
||||
DO_TEST("pool-logical-create");
|
||||
DO_TEST("pool-logical-noname");
|
||||
DO_TEST("pool-disk");
|
||||
DO_TEST("pool-disk-device-nopartsep");
|
||||
DO_TEST("pool-iscsi");
|
||||
|
||||
Reference in New Issue
Block a user