diff mbox

[PULL,19/21] hw/display/cg3.c: Fix memory leak

Message ID 08fbd77fdcb79d7ec6e10a04e9ab5411cc8b686a.1434971627.git.mjt@msgid.tls.msk.ru
State Accepted
Commit 22b2aeb82c811b227862c21e7a607087efbe5563
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/cg3.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index b94e5e0..34dcbc3 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);
         }