From 5f723b74ed950ca34e69b0673f9ff1eca864ce9a Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 9 Apr 2018 14:39:23 +0200 Subject: [PATCH] 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 Reviewed-by: Marc Hartmayer --- src/qemu/qemu_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f03aa03e8a..0486c5527d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -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;