aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-05-30 17:02:18 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2014-06-24 20:01:24 +0400
commitfeced894fb6c474eb56daeb2b2d1f99bae87677f (patch)
tree1159d990adc4d170bd5b19554ca179fffc985b06 /backends
parent5db97df274e80b03705abb418ed6f0c9b74b99ec (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')
-rw-r--r--backends/rng-random.c5
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);
}