aboutsummaryrefslogtreecommitdiffstats
path: root/xen/tools/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'xen/tools/symbols.c')
-rw-r--r--xen/tools/symbols.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index 76eb88b585..bf632d7aea 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -81,7 +81,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
if (rc != 3) {
if (rc != EOF) {
/* skip line */
- fgets(str, 500, in);
+ if (fgets(str, 500, in) == NULL)
+ return -1; /* must check fgets result */
}
return -1;
}