mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qemu_set_log_filename: filename argument may be NULL
NULL is a valid log filename used to indicate we want to use stderr but qemu_set_log_filename (which is called by bsd-user/main.c) was not handling it correctly. That also made redundant a couple of NULL checks in calling code which have been removed. Signed-off-by: Salvador Fandino <salvador@qindel.com> Message-Id: <20200123193626.19956-1-salvador@qindel.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
d4aceb2eb7
commit
e144a605a6
3 changed files with 18 additions and 19 deletions
5
vl.c
5
vl.c
|
@ -3903,10 +3903,7 @@ int main(int argc, char **argv, char **envp)
|
|||
|
||||
/* Open the logfile at this point and set the log mask if necessary.
|
||||
*/
|
||||
if (log_file) {
|
||||
qemu_set_log_filename(log_file, &error_fatal);
|
||||
}
|
||||
|
||||
qemu_set_log_filename(log_file, &error_fatal);
|
||||
if (log_mask) {
|
||||
int mask;
|
||||
mask = qemu_str_to_log_mask(log_mask);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue