All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qga-vss: Use a proper function for free memory
@ 2022-05-12 15:49 Konstantin Kostiuk
  2022-05-12 17:00 ` Marc-André Lureau
  2022-05-13  7:07 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Konstantin Kostiuk @ 2022-05-12 15:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Marc-André Lureau, Michael Roth

volume_name_wchar is allocated by 'void* operator new [](long long unsigned int)

Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
 qga/vss-win32/requester.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 4513324dd2..b371affeab 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) {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] qga-vss: Use a proper function for free memory
  2022-05-12 15:49 [PATCH] qga-vss: Use a proper function for free memory Konstantin Kostiuk
@ 2022-05-12 17:00 ` Marc-André Lureau
  2022-05-13  7:07 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2022-05-12 17:00 UTC (permalink / raw)
  To: Konstantin Kostiuk; +Cc: qemu-devel, Paolo Bonzini, Michael Roth

On Thu, May 12, 2022 at 5:49 PM Konstantin Kostiuk <kkostiuk@redhat.com> wrote:
>
> 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>

> ---
>  qga/vss-win32/requester.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 4513324dd2..b371affeab 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) {
> --
> 2.25.1
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] qga-vss: Use a proper function for free memory
  2022-05-12 15:49 [PATCH] qga-vss: Use a proper function for free memory Konstantin Kostiuk
  2022-05-12 17:00 ` Marc-André Lureau
@ 2022-05-13  7:07 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2022-05-13  7:07 UTC (permalink / raw)
  To: Konstantin Kostiuk; +Cc: qemu-devel, Marc-André Lureau, Michael Roth

Queued, thanks.

Paolo



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-13  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 15:49 [PATCH] qga-vss: Use a proper function for free memory Konstantin Kostiuk
2022-05-12 17:00 ` Marc-André Lureau
2022-05-13  7:07 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.