Blame SOURCES/0001-qga-vss-Use-a-proper-function-for-free-memory.patch
|
|
7ac0e5 |
From 4ee7074cdf48e77886637e12f148e267329978d3 Mon Sep 17 00:00:00 2001
|
|
|
7ac0e5 |
From: Konstantin Kostiuk <kkostiuk@redhat.com>
|
|
|
7ac0e5 |
Date: Thu, 12 May 2022 15:43:37 +0000
|
|
|
7ac0e5 |
Subject: [PATCH] qga-vss: Use a proper function for free memory
|
|
|
7ac0e5 |
|
|
|
7ac0e5 |
volume_name_wchar is allocated by 'void* operator new [](long long unsigned int)
|
|
|
7ac0e5 |
|
|
|
7ac0e5 |
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
|
|
|
7ac0e5 |
---
|
|
|
7ac0e5 |
qga/vss-win32/requester.cpp | 4 ++--
|
|
|
7ac0e5 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
7ac0e5 |
|
|
|
7ac0e5 |
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
|
|
|
7ac0e5 |
index 4513324dd2..b371affeab 100644
|
|
|
7ac0e5 |
--- a/qga/vss-win32/requester.cpp
|
|
|
7ac0e5 |
+++ b/qga/vss-win32/requester.cpp
|
|
|
7ac0e5 |
@@ -354,12 +354,12 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
|
|
|
7ac0e5 |
if (FAILED(hr)) {
|
|
|
7ac0e5 |
err_set(errset, hr, "failed to add %S to snapshot set",
|
|
|
7ac0e5 |
volume_name_wchar);
|
|
|
7ac0e5 |
- delete volume_name_wchar;
|
|
|
7ac0e5 |
+ delete[] volume_name_wchar;
|
|
|
7ac0e5 |
goto out;
|
|
|
7ac0e5 |
}
|
|
|
7ac0e5 |
num_mount_points++;
|
|
|
7ac0e5 |
|
|
|
7ac0e5 |
- delete volume_name_wchar;
|
|
|
7ac0e5 |
+ delete[] volume_name_wchar;
|
|
|
7ac0e5 |
}
|
|
|
7ac0e5 |
|
|
|
7ac0e5 |
if (num_mount_points == 0) {
|
|
|
7ac0e5 |
--
|
|
|
7ac0e5 |
2.25.1
|