From 8684e85ca911b41d6a82ac5bcc5a0bfaba5eb7da Mon Sep 17 00:00:00 2001 From: Shannon Zhao Date: Thu, 28 May 2015 19:13:45 +0800 Subject: hw/display/tcx.c: Fix memory leak Signed-off-by: Shannon Zhao Signed-off-by: Michael Tokarev --- hw/display/tcx.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/display') diff --git a/hw/display/tcx.c b/hw/display/tcx.c index a0b6bc58de..6acdc2d282 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); } -- cgit v1.2.3