aboutsummaryrefslogtreecommitdiffstats
path: root/vlib-api/vlibmemory
diff options
context:
space:
mode:
Diffstat (limited to 'vlib-api/vlibmemory')
-rw-r--r--vlib-api/vlibmemory/memory_vlib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vlib-api/vlibmemory/memory_vlib.c b/vlib-api/vlibmemory/memory_vlib.c
index c2c14acf183..13b1121a0f4 100644
--- a/vlib-api/vlibmemory/memory_vlib.c
+++ b/vlib-api/vlibmemory/memory_vlib.c
@@ -1042,7 +1042,12 @@ vl_api_trace_print_file_cmd (vlib_main_t * vm, u32 first, u32 last,
}
msg_id = ntohs (msg_id);
- fseek (fp, -2, SEEK_CUR);
+ if (fseek (fp, -2, SEEK_CUR) < 0)
+ {
+ vlib_cli_output (vm, "fseek failed, %s", strerror(errno));
+ fclose(fp);
+ return;
+ }
/* Mild sanity check */
if (msg_id >= vec_len (am->msg_handlers))