From feced894fb6c474eb56daeb2b2d1f99bae87677f Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 30 May 2014 17:02:18 -0300 Subject: [PATCH] rng-random: NULL check not needed before g_free() g_free() is NULL-safe. Signed-off-by: Eduardo Habkost Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- 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 136499d305..601d9dc0c2 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); }