rng-random: NULL check not needed before g_free()

g_free() is NULL-safe.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Eduardo Habkost 2014-05-30 17:02:18 -03:00 committed by Michael Tokarev
parent 5db97df274
commit feced894fb

View File

@ -106,10 +106,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
return; return;
} }
if (s->filename) { g_free(s->filename);
g_free(s->filename);
}
s->filename = g_strdup(filename); s->filename = g_strdup(filename);
} }