aboutsummaryrefslogtreecommitdiff
path: root/qga/vss-win32
diff options
context:
space:
mode:
authorKonstantin Kostiuk <kkostiuk@redhat.com>2022-05-12 18:49:09 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2022-05-14 12:32:41 +0200
commit6c1d88c72bd740cc431a13a02145168cf87866fc (patch)
tree4d9b57f493551554eda2b87f0cea78500a88a94c /qga/vss-win32
parent580ea136eb37b9a059bdba9c20260dc825bcc2de (diff)
downloadqemu-6c1d88c72bd740cc431a13a02145168cf87866fc.zip
qemu-6c1d88c72bd740cc431a13a02145168cf87866fc.tar.gz
qemu-6c1d88c72bd740cc431a13a02145168cf87866fc.tar.bz2
qga-vss: Use the proper operator to free memory
volume_name_wchar is allocated by 'void* operator new [](long long unsigned int) Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220512154909.331481-1-kkostiuk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qga/vss-win32')
-rw-r--r--qga/vss-win32/requester.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 4513324..b371aff 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -354,12 +354,12 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
if (FAILED(hr)) {
err_set(errset, hr, "failed to add %S to snapshot set",
volume_name_wchar);
- delete volume_name_wchar;
+ delete[] volume_name_wchar;
goto out;
}
num_mount_points++;
- delete volume_name_wchar;
+ delete[] volume_name_wchar;
}
if (num_mount_points == 0) {