提交 8684e85c 编写于 作者: S Shannon Zhao 提交者: Michael Tokarev

hw/display/tcx.c: Fix memory leak

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com
Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 22b2aeb8
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册