summaryrefslogtreecommitdiffstats
path: root/hw/display
diff options
context:
space:
mode:
authorShannon Zhao2015-05-28 13:13:42 +0200
committerMichael Tokarev2015-06-23 19:23:39 +0200
commit22b2aeb82c811b227862c21e7a607087efbe5563 (patch)
treed5fe8678d4c4546122e5f10b4620e268f6fba026 /hw/display
parentMakefile: Add "make ctags" (diff)
downloadqemu-22b2aeb82c811b227862c21e7a607087efbe5563.tar.gz
qemu-22b2aeb82c811b227862c21e7a607087efbe5563.tar.xz
qemu-22b2aeb82c811b227862c21e7a607087efbe5563.zip
hw/display/cg3.c: Fix memory leak
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/cg3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index b94e5e0d78..34dcbc3119 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -303,6 +303,7 @@ static void cg3_realizefn(DeviceState *dev, Error **errp)
if (fcode_filename) {
ret = load_image_targphys(fcode_filename, s->prom_addr,
FCODE_MAX_ROM_SIZE);
+ g_free(fcode_filename);
if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
error_report("cg3: could not load prom '%s'", CG3_ROM_FILE);
}