All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-trivial@nongnu.org, "Marcel Apfelbaum" <marcel.a@redhat.com>,
	qemu-devel@nongnu.org, "Anthony Liguori" <aliguori@amazon.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-trivial] [PATCH 1/3] rng-random: NULL check not needed before g_free()
Date: Mon, 9 Jun 2014 16:04:26 -0400	[thread overview]
Message-ID: <20140609160426.63250974@redhat.com> (raw)
In-Reply-To: <1401480140-18653-2-git-send-email-ehabkost@redhat.com>

On Fri, 30 May 2014 17:02:18 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> g_free() is NULL-safe.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

This one should to go through qemu-trivial (CCed).

> ---
> Cc: Anthony Liguori <aliguori@amazon.com>
> Cc: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>  backends/rng-random.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/backends/rng-random.c b/backends/rng-random.c
> index 136499d..601d9dc 100644
> --- a/backends/rng-random.c
> +++ b/backends/rng-random.c
> @@ -106,10 +106,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
>          return;
>      }
>  
> -    if (s->filename) {
> -        g_free(s->filename);
> -    }
> -
> +    g_free(s->filename);
>      s->filename = g_strdup(filename);
>  }
>  



WARNING: multiple messages have this Message-ID (diff)
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-trivial@nongnu.org, "Marcel Apfelbaum" <marcel.a@redhat.com>,
	qemu-devel@nongnu.org, "Anthony Liguori" <aliguori@amazon.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 1/3] rng-random: NULL check not needed before g_free()
Date: Mon, 9 Jun 2014 16:04:26 -0400	[thread overview]
Message-ID: <20140609160426.63250974@redhat.com> (raw)
In-Reply-To: <1401480140-18653-2-git-send-email-ehabkost@redhat.com>

On Fri, 30 May 2014 17:02:18 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> g_free() is NULL-safe.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

This one should to go through qemu-trivial (CCed).

> ---
> Cc: Anthony Liguori <aliguori@amazon.com>
> Cc: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>  backends/rng-random.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/backends/rng-random.c b/backends/rng-random.c
> index 136499d..601d9dc 100644
> --- a/backends/rng-random.c
> +++ b/backends/rng-random.c
> @@ -106,10 +106,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
>          return;
>      }
>  
> -    if (s->filename) {
> -        g_free(s->filename);
> -    }
> -
> +    g_free(s->filename);
>      s->filename = g_strdup(filename);
>  }
>  

  parent reply	other threads:[~2014-06-09 20:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1401480140-18653-1-git-send-email-ehabkost@redhat.com>
     [not found] ` <1401480140-18653-4-git-send-email-ehabkost@redhat.com>
2014-06-01  8:25   ` [Qemu-devel] [PATCH 3/3] hw/machine: Free old values of string properties Marcel Apfelbaum
2014-06-02 11:51     ` Markus Armbruster
2014-06-02 12:13       ` Marcel Apfelbaum
2014-06-02 12:52         ` Markus Armbruster
2014-06-02 14:33           ` Marcel Apfelbaum
     [not found] ` <1401480140-18653-2-git-send-email-ehabkost@redhat.com>
2014-06-02 11:38   ` [Qemu-devel] [PATCH 1/3] rng-random: NULL check not needed before g_free() Markus Armbruster
2014-08-07  2:19     ` Amos Kong
2014-06-09 20:04   ` Luiz Capitulino [this message]
2014-06-09 20:04     ` Luiz Capitulino
2014-06-21 15:06     ` [Qemu-trivial] " Michael Tokarev
2014-06-21 15:06       ` [Qemu-devel] " Michael Tokarev
     [not found] ` <1401480140-18653-3-git-send-email-ehabkost@redhat.com>
2014-06-02 12:58   ` [Qemu-devel] [PATCH 2/3] rng-egd: Free old chr_name value before setting new one Markus Armbruster
2014-06-02 14:50     ` Eduardo Habkost

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=20140609160426.63250974@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.