net/ark: fix return value of null not checked
Coverity issue: 144517
Fixes: 1131cbf0fb
("net/ark: stub PMD for Atomic Rules Arkville")
Cc: stable@dpdk.org
Signed-off-by: John Miller <john.miller@atomicrules.com>
This commit is contained in:
parent
bc10f22b6d
commit
2f3b88fbab
@ -899,6 +899,12 @@ process_file_args(const char *key, const char *value, void *extra_args)
|
||||
int size = 0;
|
||||
int first = 1;
|
||||
|
||||
if (file == NULL) {
|
||||
PMD_DRV_LOG(ERR, "Unable to open "
|
||||
"config file %s\n", value);
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (fgets(line, sizeof(line), file)) {
|
||||
size += strlen(line);
|
||||
if (size >= ARK_MAX_ARG_LEN) {
|
||||
|
Loading…
Reference in New Issue
Block a user