Commit 4bdb1a30 authored by Stefan Weil's avatar Stefan Weil Committed by Anthony Liguori
Browse files

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: default avatarLuiz Capitulino <>
Signed-off-by: default avatarStefan Weil <>
Signed-off-by: default avatarAnthony Liguori <>
parent 7e2a62d8
...@@ -438,7 +438,9 @@ static void become_daemon(const char *pidfile) ...@@ -438,7 +438,9 @@ static void become_daemon(const char *pidfile)
return; return;
fail: fail:
if (pidfile) {
unlink(pidfile); unlink(pidfile);
g_critical("failed to daemonize"); g_critical("failed to daemonize");
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment