diff mbox

[PULL,20/21] hw/display/tcx.c: Fix memory leak

Message ID 1ef32d467d228cc23445bdaa0a1c4e9fe1ef384f.1434971627.git.mjt@msgid.tls.msk.ru
State Accepted
Commit 8684e85ca911b41d6a82ac5bcc5a0bfaba5eb7da
Headers show

Commit Message

Michael Tokarev June 22, 2015, 11:16 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>

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>
---
 hw/display/tcx.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index f3faf78..244f777 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -1017,6 +1017,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);
         }