]> Git Repo - qemu.git/commit - qga/main.c
qemu-ga: fix segv after failure to open log file
authorMichael Roth <[email protected]>
Mon, 14 May 2012 21:42:35 +0000 (16:42 -0500)
committerMichael Roth <[email protected]>
Tue, 15 May 2012 14:16:55 +0000 (09:16 -0500)
commit6c615ec57e83bf8cc7b1721bcd58c7d1ed93ef65
tree7f3984ee87168ce88de2c66b330c5bdd639febef
parent3674838cd05268954bb6473239cd7f700a79bf0f
qemu-ga: fix segv after failure to open log file

Currently, if we fail to open the specified log file (generally due to a
permissions issue), we'll assign NULL to the logfile handle (stderr,
initially) used by the logging routines, which can cause a segfault to
occur when we attempt to report the error before exiting.

Instead, only re-assign if the open() was successful.

Reviewed-by: Michal Privoznik <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
qemu-ga.c
This page took 0.025222 seconds and 4 git commands to generate.