Fix coverity warnings
Change-Id: I37131f2d814a608fe9098daff83ff395f7ce99d7 Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
@ -780,6 +780,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
|
||||
if (!(statb.st_mode & S_IFREG) || (statb.st_size < sizeof (*hp)))
|
||||
{
|
||||
vlib_cli_output (vm, "File not plausible: %s\n", filename);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -814,6 +815,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
|
||||
{
|
||||
vlib_cli_output (vm, "Range (%d, %d) outside file range (0, %d)\n",
|
||||
first_index, last_index, nitems - 1);
|
||||
munmap (hp, file_size);
|
||||
return;
|
||||
}
|
||||
if (hp->wrapped)
|
||||
|
Reference in New Issue
Block a user