net/virtio: fix incorrect cast of void *
[dpdk.git] / app / test-pmd / cmdline.c
index 3b691fe..f71d963 100644 (file)
@@ -10211,7 +10211,7 @@ cmdline_parse_inst_t cmd_add_del_ip_flow_director = {
                "ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|"
                "l2_payload src <src_ip> dst <dst_ip> tos <tos_value> "
                "proto <proto_value> ttl <ttl_value> vlan <vlan_value> "
-               "flexbytes <flexbyte_vaues> drop|fw <pf_vf> queue <queue_id> "
+               "flexbytes <flexbyte_values> drop|fw <pf_vf> queue <queue_id> "
                "fd_id <fd_id_value>: "
                "Add or delete an ip flow director entry on NIC",
        .tokens = {
@@ -14362,7 +14362,7 @@ cmd_ddp_info_parsed(
        uint32_t dev_num = 0;
        struct rte_pmd_i40e_ddp_device_id *devs;
        uint32_t proto_num = 0;
-       struct rte_pmd_i40e_proto_info *proto;
+       struct rte_pmd_i40e_proto_info *proto = NULL;
        uint32_t pctype_num = 0;
        struct rte_pmd_i40e_ptype_info *pctype;
        uint32_t ptype_num = 0;
@@ -14541,9 +14541,10 @@ no_print_pctypes:
        free(ptype);
        printf("\n");
 
-       free(proto);
        ret = 0;
 no_print_return:
+       if (proto)
+               free(proto);
 #endif
        if (ret == -ENOTSUP)
                printf("Function not supported in PMD driver\n");