diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2014-05-30 17:02:18 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-06-24 20:01:24 +0400 |
commit | feced894fb6c474eb56daeb2b2d1f99bae87677f (patch) | |
tree | 1159d990adc4d170bd5b19554ca179fffc985b06 /backends/rng-random.c | |
parent | 5db97df274e80b03705abb418ed6f0c9b74b99ec (diff) |
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>
Diffstat (limited to 'backends/rng-random.c')
-rw-r--r-- | backends/rng-random.c | 5 |
1 files changed, 1 insertions, 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); } |