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

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

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

> ---
> Cc: Anthony Liguori <aligu...@amazon.com>
> Cc: Luiz Capitulino <lcapitul...@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);
>  }
>  


Reply via email to