qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for 1.2] qemu-ga: Fix null pointer passed to unlink in failure branch
Date: Fri, 24 Aug 2012 10:48:13 -0300	[thread overview]
Message-ID: <20120824104813.4345db29@doriath.home> (raw)
In-Reply-To: <1345784583-25640-1-git-send-email-sw@weilnetz.de>

On Fri, 24 Aug 2012 07:03:03 +0200
Stefan Weil <sw@weilnetz.de> wrote:

> Clang reports this warning:
> 
> Null pointer passed as an argument to a 'nonnull' parameter
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

Reviewed-by: Luiz Capitulino <lcapitulino@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

      parent reply	other threads:[~2012-08-24 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24  5:03 [Qemu-devel] [PATCH for 1.2] qemu-ga: Fix null pointer passed to unlink in failure branch Stefan Weil
2012-08-24 11:29 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-08-24 13:48 ` Luiz Capitulino [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120824104813.4345db29@doriath.home \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).