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:
parent
5db97df274
commit
feced894fb
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user