提交 6ff14469 编写于 作者: P Peter Maydell

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2018-11-12-tag' into staging

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

# gpg: Signature made Tue 13 Nov 2018 02:52:12 GMT
# gpg:                using RSA key 3353C9CEF108B584
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
# gpg:                 aka "Michael Roth <mdroth@utexas.edu>"
# gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2018-11-12-tag:
  qga: Add multiple include guard to guest-agent-core.h
  qga-win: fix leaks of build_guest_disk_info()
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
......@@ -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);
......
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册