mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/display/cg3.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>
This commit is contained in:
parent
ae5fdc81a1
commit
22b2aeb82c
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue