1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-27 18:03:50 +03:00

qemuDomainNamespaceSetupDisk: Fix const correctness

The array of strings we are building is indeed array of const
strings. We are not STRDUP()-ing them nor FREE()-ing them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
This commit is contained in:
Michal Privoznik 2018-04-09 14:39:23 +02:00
parent ea8ff2eb64
commit 5f723b74ed

View File

@ -11196,7 +11196,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
virStorageSourcePtr src)
{
virStorageSourcePtr next;
char **paths = NULL;
const char **paths = NULL;
size_t npaths = 0;
int ret = -1;
@ -11214,7 +11214,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
goto cleanup;
}
if (qemuDomainNamespaceMknodPaths(vm, (const char **)paths, npaths) < 0)
if (qemuDomainNamespaceMknodPaths(vm, paths, npaths) < 0)
return -1;
ret = 0;