Skip to contentSkip to conversation

qemu-ga patch queue for 3.1.0

GIT PULL Applied Michael Roth 2 participants 4 messages Nov 13, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit 160e5c22e55b3f775c2003dfc626fa872ee4a7a1:

Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2018-11-09 10:54:10 +0000)

are available in the Git repository at:

git://github.com/mdroth/qemu.git tags/qga-pull-2018-11-12-tag

for you to fetch changes up to 61baac2fdb7ad3891fb00bbd3c9e8b8ca87f0f62:

qga: Add multiple include guard to guest-agent-core.h (2018-11-09 07:55:13 -0600)

----------------------------------------------------------------
qemu-ga patch queue for 3.1.0

* add missing #include guards for guest-agent-core.h
* fix leaks introduced with recent win32 enablement of disk info in guest-get-fsinfo

----------------------------------------------------------------
Marc-André Lureau (1):
qga-win: fix leaks of build_guest_disk_info()

Peter Maydell (1):
qga: Add multiple include guard to guest-agent-core.h

 qga/commands-win32.c   | 5 ++++-
 qga/guest-agent-core.h | 5 +++++
 2 files changed, 9 insertions(+), 1 deletion(-)
#1 lore raw

[Qemu-devel] [PULL for-3.1 1/2] qga-win: fix leaks of build_guest_disk_info()

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

Introduced in commit b1ba8890e63ce9432c41c5c3fc229f54c87c9c99, vol_h handle should be closed, and "out" cleanup should be done after DeviceIoControl() fails.

---
 qga/commands-win32.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
qga/commands-win32.c +4 -1
index ef1d7d48d2..62e1b51dfe 100644
@@ -797,7 +797,7 @@ static GuestDiskAddressList *build_guest_disk_info(char *guid, Error **errp)
                     0, extents, size, NULL, NULL)) {
                 error_setg_win32(errp, GetLastError(),
                     "failed to get disk extents");
-                return NULL;
+                goto out;
             }
         } else if (last_err == ERROR_INVALID_FUNCTION) {
             /* Possibly CD-ROM or a shared drive. Try to pass the volume */
@@ -855,6 +855,9 @@ static GuestDiskAddressList *build_guest_disk_info(char *guid, Error **errp)
 
 
 out:
+    if (vol_h != INVALID_HANDLE_VALUE) {
+        CloseHandle(vol_h);
+    }
     qapi_free_GuestDiskAddress(disk);
     g_free(extents);
     g_free(name);
Signature · 1 line
2.17.1
#2 lore raw

[Qemu-devel] [PULL for-3.1 2/2] qga: Add multiple include guard to guest-agent-core.h

In reply to Michael Roth

From: Peter Maydell <[email protected]>

The guest-agent-core.h header was missing the usual guards against multiple inclusion; add them.

(Spotted by lgtm.com's static analyzer.)

---
 qga/guest-agent-core.h | 5 +++++
 1 file changed, 5 insertions(+)
qga/guest-agent-core.h +5 -0
index 6f4d214cb9..60eae16f27 100644
@@ -10,6 +10,9 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
+#ifndef GUEST_AGENT_CORE_H
+#define GUEST_AGENT_CORE_H
+
 #include "qapi/qmp/dispatch.h"
 #include "qemu-common.h"
 #include "qga-qapi-types.h"
@@ -46,3 +49,5 @@ int ga_parse_whence(GuestFileWhence *whence, Error **errp);
 #ifndef _WIN32
 void reopen_fd_to_null(int fd);
 #endif
+
+#endif /* GUEST_AGENT_CORE_H */
Signature · 1 line
2.17.1
#3 lore raw
In reply to Michael Roth
Quoted 19 lines · Michael Roth

The following changes since commit 160e5c22e55b3f775c2003dfc626fa872ee4a7a1:

Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2018-11-09 10:54:10 +0000)

are available in the Git repository at:

git://github.com/mdroth/qemu.git tags/qga-pull-2018-11-12-tag

for you to fetch changes up to 61baac2fdb7ad3891fb00bbd3c9e8b8ca87f0f62:

qga: Add multiple include guard to guest-agent-core.h (2018-11-09 07:55:13 -0600)

----------------------------------------------------------------
qemu-ga patch queue for 3.1.0

* add missing #include guards for guest-agent-core.h
* fix leaks introduced with recent win32 enablement of disk info in guest-get-fsinfo

Quoted 6 lines

----------------------------------------------------------------
Marc-André Lureau (1):
qga-win: fix leaks of build_guest_disk_info()

Peter Maydell (1):
qga: Add multiple include guard to guest-agent-core.h

Applied, thanks.

-- PMM