Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
 qemu-config.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/qemu-config.c b/qemu-config.c
index 78e5c67..acd4db7 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -475,6 +475,10 @@ int qemu_config_parse(FILE *fp, const char *fname)
         qemu_error("parse error");
         goto out;
     }
+    if (ferror(fp)) {
+        qemu_error("error reading file");
+        goto out;
+    }
     res = 0;
 out:
     loc_pop(&loc);
-- 
1.6.6



Reply via email to