diff mbox

[2/3] qga: fixed CloseHandle in qmp_guest_file_open

Message ID 1445968123-1773-3-git-send-email-den@openvz.org
State New
Headers show

Commit Message

Denis V. Lunev Oct. 27, 2015, 5:48 p.m. UTC
From: Olga Krishtal <okrishtal@parallels.com>

CloseHandle use HANDLE as an argument, but not *HANDLE

Signed-off-by: Olga Krishtal <okrishtal@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
CC: Stefan Weil <sw@weilnetz.de>
---
 qga/commands-win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Weil Oct. 27, 2015, 6:14 p.m. UTC | #1
Am 27.10.2015 um 18:48 schrieb Denis V. Lunev:
> From: Olga Krishtal <okrishtal@parallels.com>
> 
> CloseHandle use HANDLE as an argument, but not *HANDLE
> 
> Signed-off-by: Olga Krishtal <okrishtal@parallels.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> CC: Stefan Weil <sw@weilnetz.de>
> ---
>  qga/commands-win32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> index d9de23b..97f19d5 100644
> --- a/qga/commands-win32.c
> +++ b/qga/commands-win32.c
> @@ -160,7 +160,7 @@ int64_t qmp_guest_file_open(const char *path, bool has_mode,
>  
>      fd = guest_file_handle_add(fh, errp);
>      if (fd < 0) {
> -        CloseHandle(&fh);
> +        CloseHandle(fh);
>          error_setg(errp, "failed to add handle to qmp handle table");
>          return -1;
>      }
> 

Reviewed-by: Stefan Weil <sw@weilnetz.de>
diff mbox

Patch

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index d9de23b..97f19d5 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -160,7 +160,7 @@  int64_t qmp_guest_file_open(const char *path, bool has_mode,
 
     fd = guest_file_handle_add(fh, errp);
     if (fd < 0) {
-        CloseHandle(&fh);
+        CloseHandle(fh);
         error_setg(errp, "failed to add handle to qmp handle table");
         return -1;
     }