mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
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
1 changed files with 1 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue