summaryrefslogtreecommitdiffstats
path: root/target-openrisc
diff options
context:
space:
mode:
authorJia Liu2013-07-23 12:32:30 +0200
committerJia Liu2013-07-23 12:32:30 +0200
commit9b146e9a28bbd9567f5ac6a8e2bcb543aa3b9392 (patch)
tree5d646854d4bc7f9fa68551d6357f9057beda2ef0 /target-openrisc
parenthw/openrisc: Use stderr output instead of qemu_log (diff)
downloadqemu-9b146e9a28bbd9567f5ac6a8e2bcb543aa3b9392.tar.gz
qemu-9b146e9a28bbd9567f5ac6a8e2bcb543aa3b9392.tar.xz
qemu-9b146e9a28bbd9567f5ac6a8e2bcb543aa3b9392.zip
target-openrisc: Free typename in openrisc_cpu_class_by_name
We should free typename here. Signed-off-by: Jia Liu <proljc@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-openrisc')
-rw-r--r--target-openrisc/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c
index 6d40f1b85e..e348df0fef 100644
--- a/target-openrisc/cpu.c
+++ b/target-openrisc/cpu.c
@@ -99,6 +99,7 @@ static ObjectClass *openrisc_cpu_class_by_name(const char *cpu_model)
typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model);
oc = object_class_by_name(typename);
+ g_free(typename);
if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_OPENRISC_CPU) ||
object_class_is_abstract(oc))) {
return NULL;