diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-07-17 09:57:34 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-17 09:57:34 +0100 |
commit | 3e86907c822c0d7e6f9a4476a5b234a60f6adcf2 (patch) | |
tree | d11f215c1594d41fc5fc74b354efd831ab3adbbe | |
parent | 1310df8b99cd40b5277911506c045b35e6e7f640 (diff) | |
parent | d9c745c1768727aadd77e352c85114bc61e67bd4 (diff) |
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2018-07-16-tag' into staging
qemu-ga patch queue for hard-freeze
* fix file descriptor leak in suspend command
* fix leak in guest-get-fsinfo
# gpg: Signature made Mon 16 Jul 2018 22:41:41 BST
# 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-07-16-tag:
qga: fix file descriptor leak
qga: fix 'driver' leak in guest-get-fsinfo
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | qga/commands-posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 233f78a406..37e8a2d791 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -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; @@ -1651,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; } |