X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fcli.c;h=c9587f5661745c545a600b919380f1978b1d8924;hb=1d20a073fa5e;hp=199a31ff89a225d63c074f0619dacda4e5cb9234;hpb=085c3d8c4d5266e16a7edce32af0625e2b447bb8;p=dpdk.git diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c index 199a31ff89..c9587f5661 100644 --- a/examples/ip_pipeline/cli.c +++ b/examples/ip_pipeline/cli.c @@ -138,6 +138,8 @@ cmd_link(char **tokens, struct link *link; char *name; + memset(&p, 0, sizeof(p)); + if ((n_tokens < 13) || (n_tokens > 14 + LINK_RXQ_RSS_MAX)) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); return; @@ -651,6 +653,7 @@ cmd_kni(char **tokens, char *name; struct kni *kni; + memset(&p, 0, sizeof(p)); if ((n_tokens != 6) && (n_tokens != 8)) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); return; @@ -1890,12 +1893,6 @@ cmd_pipeline_table(char **tokens, t0 += 6; } else if (strcmp(tokens[t0], "stub") == 0) { - if (n_tokens < t0 + 1) { - snprintf(out, out_size, MSG_ARG_MISMATCH, - "pipeline table stub"); - return; - } - p.match_type = TABLE_STUB; t0 += 1; @@ -4158,6 +4155,7 @@ load_dscp_table(struct rte_table_action_dscp_table *dscp_table, if (parse_tokenize_string(line, tokens, &n_tokens)) { *line_number = l; + fclose(f); return -EINVAL; } @@ -4172,6 +4170,7 @@ load_dscp_table(struct rte_table_action_dscp_table *dscp_table, (tc_queue_id >= RTE_TABLE_ACTION_TC_QUEUE_MAX) || (strlen(tokens[2]) != 1)) { *line_number = l; + fclose(f); return -EINVAL; } @@ -4193,6 +4192,7 @@ load_dscp_table(struct rte_table_action_dscp_table *dscp_table, default: *line_number = l; + fclose(f); return -EINVAL; }