Revert "rng-egd: remove redundant free"

This reverts commit 5e490b6a50.

Cc: qemu-stable@nongnu.org
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Eduardo Habkost 2014-09-04 19:10:47 +03:00 committed by Michael S. Tsirkin
parent b3ce84fea4
commit abb4d5f2e2

View File

@ -169,6 +169,7 @@ static void rng_egd_set_chardev(Object *obj, const char *value, Error **errp)
if (b->opened) { if (b->opened) {
error_set(errp, QERR_PERMISSION_DENIED); error_set(errp, QERR_PERMISSION_DENIED);
} else { } else {
g_free(s->chr_name);
s->chr_name = g_strdup(value); s->chr_name = g_strdup(value);
} }
} }