aboutsummaryrefslogtreecommitdiffstats
path: root/qemu-config.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-02-18 19:56:01 +0100
committerMarkus Armbruster <armbru@redhat.com>2010-03-16 16:58:32 +0100
commitef82516d8fb41cbae9703d07516641f6bdf91a77 (patch)
tree1b43e98ae4d2efcaad9e6999919ac37a1e85703f /qemu-config.c
parentcf5a65aaaf3e9382e50df550ba049a1c8691a5dd (diff)
QemuOpts: Fix qemu_config_parse() to catch file read errors
Diffstat (limited to 'qemu-config.c')
-rw-r--r--qemu-config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-config.c b/qemu-config.c
index 2de97cde2..ad130fbeb 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -475,6 +475,10 @@ int qemu_config_parse(FILE *fp, const char *fname)
error_report("parse error");
goto out;
}
+ if (ferror(fp)) {
+ error_report("error reading file");
+ goto out;
+ }
res = 0;
out:
loc_pop(&loc);