Replace WriteFileEx with WriteFile in qemu_create_pidfile
commitbfc763fcfa80d89d31c4f801c2a82130dd92c708
authorFabien Chouteau <chouteau@adacore.com>
Mon, 7 Nov 2011 14:36:14 +0000 (7 15:36 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 9 Nov 2011 18:06:20 +0000 (9 12:06 -0600)
treeeac1aee304fd81d15f7207a8ecbda45a93890083
parentcca5de7389ff850ab19d4458da6a0c22ccbac976
Replace WriteFileEx with WriteFile in qemu_create_pidfile

The function that writes pidfile for win32 uses WriteFileEx which is an
asynchronous IO function. The arguments given to WriteFileEx are allocated on
the stack and one of them is "in out". When the IO operation is actually
executed the calling function has already returned, so the arguments are no
longer allocated or allocated to another frame.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
os-win32.c