On Fri, 24 Aug 2012 07:03:03 +0200 Stefan Weil <s...@weilnetz.de> wrote:
> Clang reports this warning: > > Null pointer passed as an argument to a 'nonnull' parameter > > Signed-off-by: Stefan Weil <s...@weilnetz.de> Reviewed-by: Luiz Capitulino <lcapitul...@redhat.com> > --- > qemu-ga.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/qemu-ga.c b/qemu-ga.c > index 26671fe..7623079 100644 > --- a/qemu-ga.c > +++ b/qemu-ga.c > @@ -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