Message ID | 1337093339-10786-13-git-send-email-mdroth@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
diff --git a/qemu-ga.c b/qemu-ga.c index 3a88333..42e271f 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -836,12 +836,13 @@ int main(int argc, char **argv) become_daemon(pid_filepath); } if (log_filepath) { - s->log_file = fopen(log_filepath, "a"); - if (!s->log_file) { + FILE *log_file = fopen(log_filepath, "a"); + if (!log_file) { g_critical("unable to open specified log file: %s", strerror(errno)); goto out_bad; } + s->log_file = log_file; } }