Skip to contentSkip to conversation

qemu-ga patch queue for hard-freeze

GIT PULL Applied Michael Roth 2 participants 4 messages Jul 16, 2018 – Jul 17, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit 102ad0a80f5110483efd06877c29c4236be267f9:

Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-07-16' into staging (2018-07-16 15:34:38 +0100)

are available in the git repository at:

git://github.com/mdroth/qemu.git tags/qga-pull-2018-07-16-tag

for you to fetch changes up to d9c745c1768727aadd77e352c85114bc61e67bd4:

qga: fix file descriptor leak (2018-07-16 15:05:58 -0500)

----------------------------------------------------------------
qemu-ga patch queue for hard-freeze

* fix file descriptor leak in suspend command
* fix leak in guest-get-fsinfo

----------------------------------------------------------------
Marc-André Lureau (1):
qga: fix 'driver' leak in guest-get-fsinfo

Paolo Bonzini (1):
qga: fix file descriptor leak

 qga/commands-posix.c | 2 ++
 1 file changed, 2 insertions(+)
#1 lore raw

[Qemu-devel] [PULL for-3.0 1/2] qga: fix 'driver' leak in guest-get-fsinfo

From: Marc-André Lureau <[email protected]>

'driver' is leaked when the loop is not broken.

Leak introduced by commit 743c71d03c20d64f2bae5fba6f26cdf5e4b1bda6, spotted by ASAN.

---
 qga/commands-posix.c | 1 +
 1 file changed, 1 insertion(+)
qga/commands-posix.c +1 -0
index 233f78a406..c46767b0dd 100644
@@ -890,6 +890,7 @@ static void build_guest_fsinfo_for_real_device(char const *syspath,
             break;
         }
 
+        g_free(driver);
         if (sscanf(p, "/%x:%x:%x.%x%n",
                           pci, pci + 1, pci + 2, pci + 3, &pcilen) == 4) {
             p += pcilen;
Signature · 1 line
2.11.0
#2 lore raw

[Qemu-devel] [PULL for-3.0 2/2] qga: fix file descriptor leak

In reply to Michael Roth

From: Paolo Bonzini <[email protected]>

The file descriptor for /sys/power/state was never closed. Reported by Coverity.

---
 qga/commands-posix.c | 1 +
 1 file changed, 1 insertion(+)
qga/commands-posix.c +1 -0
index c46767b0dd..37e8a2d791 100644
@@ -1652,6 +1652,7 @@ static bool linux_sys_state_supports_mode(SuspendMode mode, Error **errp)
     }
 
     ret = read(fd, buf, sizeof(buf) - 1);
+    close(fd);
     if (ret <= 0) {
         return false;
     }
Signature · 1 line
2.11.0
#3 lore raw
In reply to Michael Roth
Quoted 22 lines · Michael Roth

The following changes since commit 102ad0a80f5110483efd06877c29c4236be267f9:

Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-07-16' into staging (2018-07-16 15:34:38 +0100)

are available in the git repository at:

git://github.com/mdroth/qemu.git tags/qga-pull-2018-07-16-tag

for you to fetch changes up to d9c745c1768727aadd77e352c85114bc61e67bd4:

qga: fix file descriptor leak (2018-07-16 15:05:58 -0500)

----------------------------------------------------------------
qemu-ga patch queue for hard-freeze

* fix file descriptor leak in suspend command
* fix leak in guest-get-fsinfo

----------------------------------------------------------------
Marc-André Lureau (1):
qga: fix 'driver' leak in guest-get-fsinfo

Quoted 5 lines

Paolo Bonzini (1):
qga: fix file descriptor leak

 qga/commands-posix.c | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks.

-- PMM