]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainNamespaceSetupDisk: Fix const correctness
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 9 Apr 2018 12:39:23 +0000 (14:39 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Apr 2018 10:43:15 +0000 (12:43 +0200)
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>
src/qemu/qemu_domain.c

index f03aa03e8a40241813685f044d46387b51f8573b..0486c5527dc568861bf35bf7bb81626b6377563e 100644 (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;