mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qemu-ga: Fix null pointer passed to unlink in failure branch
Clang reports this warning: Null pointer passed as an argument to a 'nonnull' parameter Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
7e2a62d82a
commit
4bdb1a3059
1 changed files with 3 additions and 1 deletions
|
@ -438,7 +438,9 @@ static void become_daemon(const char *pidfile)
|
|||
return;
|
||||
|
||||
fail:
|
||||
unlink(pidfile);
|
||||
if (pidfile) {
|
||||
unlink(pidfile);
|
||||
}
|
||||
g_critical("failed to daemonize");
|
||||
exit(EXIT_FAILURE);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue