mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 21:40:49 +00:00
QemuOpts: Fix qemu_config_parse() to catch file read errors
This commit is contained in:
parent
cf5a65aaaf
commit
ef82516d8f
@ -475,6 +475,10 @@ int qemu_config_parse(FILE *fp, const char *fname)
|
|||||||
error_report("parse error");
|
error_report("parse error");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (ferror(fp)) {
|
||||||
|
error_report("error reading file");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
res = 0;
|
res = 0;
|
||||||
out:
|
out:
|
||||||
loc_pop(&loc);
|
loc_pop(&loc);
|
||||||
|
Loading…
Reference in New Issue
Block a user