aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2015-05-28 19:13:45 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2015-06-23 20:23:39 +0300
commit8684e85ca911b41d6a82ac5bcc5a0bfaba5eb7da (patch)
treee4a9fd916f60b8a2c90bd838cfc510b1665b35a5 /hw/display
parent22b2aeb82c811b227862c21e7a607087efbe5563 (diff)
downloadqemu-8684e85ca911b41d6a82ac5bcc5a0bfaba5eb7da.zip
qemu-8684e85ca911b41d6a82ac5bcc5a0bfaba5eb7da.tar.gz
qemu-8684e85ca911b41d6a82ac5bcc5a0bfaba5eb7da.tar.bz2
hw/display/tcx.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/tcx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index a0b6bc5..6acdc2d 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -1018,6 +1018,7 @@ static void tcx_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("tcx: could not load prom '%s'", TCX_ROM_FILE);
}