* [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3
@ 2021-08-10 1:39 Michael Roth
2021-08-10 1:39 ` [PULL for-6.1 1/1] qga: fix leak of base64 decoded data on command error Michael Roth
2021-08-10 12:59 ` [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3 Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Michael Roth @ 2021-08-10 1:39 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
Hi Peter,
This is a single fix for a potentially recurring memory leak in the guest
agent. If you don't think it is rc3 material I can save it for 6.2, but if
possible this would be good to have in.
The following changes since commit dee64246ded3aa7dbada68b96ce1c64e5bea327d:
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-08-06 10:28:33 +0100)
are available in the Git repository at:
git://github.com/mdroth/qemu.git tags/qga-pull-2021-08-09-tag
for you to fetch changes up to 057489dd1586612b99b4b98d211bf7f0a9d6f0e4:
qga: fix leak of base64 decoded data on command error (2021-08-09 20:18:43 -0500)
----------------------------------------------------------------
qemu-ga patch queue for hard-freeze
* fix memory leak in guest_exec
----------------------------------------------------------------
Daniel P. Berrangé (1):
qga: fix leak of base64 decoded data on command error
qga/commands.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL for-6.1 1/1] qga: fix leak of base64 decoded data on command error
2021-08-10 1:39 [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3 Michael Roth
@ 2021-08-10 1:39 ` Michael Roth
2021-08-10 12:59 ` [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3 Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Michael Roth @ 2021-08-10 1:39 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, Daniel P. Berrangé, Marc-André Lureau
From: Daniel P. Berrangé <berrange@redhat.com>
If the guest command fails to be spawned, then we would leak the decoded
base64 input used for the command's stdin feed.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
---
qga/commands.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qga/commands.c b/qga/commands.c
index a6491d2cf8..80501e4a73 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -402,7 +402,7 @@ GuestExec *qmp_guest_exec(const char *path,
GIOChannel *in_ch, *out_ch, *err_ch;
GSpawnFlags flags;
bool has_output = (has_capture_output && capture_output);
- uint8_t *input = NULL;
+ g_autofree uint8_t *input = NULL;
size_t ninput = 0;
arglist.value = (char *)path;
@@ -441,7 +441,7 @@ GuestExec *qmp_guest_exec(const char *path,
g_child_watch_add(pid, guest_exec_child_watch, gei);
if (has_input_data) {
- gei->in.data = input;
+ gei->in.data = g_steal_pointer(&input);
gei->in.size = ninput;
#ifdef G_OS_WIN32
in_ch = g_io_channel_win32_new_fd(in_fd);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3
2021-08-10 1:39 [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3 Michael Roth
2021-08-10 1:39 ` [PULL for-6.1 1/1] qga: fix leak of base64 decoded data on command error Michael Roth
@ 2021-08-10 12:59 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2021-08-10 12:59 UTC (permalink / raw)
To: Michael Roth; +Cc: QEMU Developers
On Tue, 10 Aug 2021 at 02:43, Michael Roth <michael.roth@amd.com> wrote:
>
> Hi Peter,
>
> This is a single fix for a potentially recurring memory leak in the guest
> agent. If you don't think it is rc3 material I can save it for 6.2, but if
> possible this would be good to have in.
>
> The following changes since commit dee64246ded3aa7dbada68b96ce1c64e5bea327d:
>
> Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-08-06 10:28:33 +0100)
>
> are available in the Git repository at:
>
> git://github.com/mdroth/qemu.git tags/qga-pull-2021-08-09-tag
>
> for you to fetch changes up to 057489dd1586612b99b4b98d211bf7f0a9d6f0e4:
>
> qga: fix leak of base64 decoded data on command error (2021-08-09 20:18:43 -0500)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for hard-freeze
>
> * fix memory leak in guest_exec
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-10 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 1:39 [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3 Michael Roth
2021-08-10 1:39 ` [PULL for-6.1 1/1] qga: fix leak of base64 decoded data on command error Michael Roth
2021-08-10 12:59 ` [PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3 Peter Maydell
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.