aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2015-05-28 19:13:42 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2015-06-23 20:23:39 +0300
commit22b2aeb82c811b227862c21e7a607087efbe5563 (patch)
treed5fe8678d4c4546122e5f10b4620e268f6fba026
parentae5fdc81a16534ea04fc475f8723e81857c46ad4 (diff)
downloadqemu-arm-22b2aeb82c811b227862c21e7a607087efbe5563.tar.gz
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>
-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);
}