* Return the pointer of the flow, or NULL for failed
**/
static inline struct rte_flow *
-igc_alloc_flow(const void *filter, enum igc_filter_type type, uint inbytes)
+igc_alloc_flow(const void *filter, enum igc_filter_type type, size_t inbytes)
{
/* allocate memory, 8 bytes boundary aligned */
struct rte_flow *flow = rte_malloc("igc flow filter",
}
if (ret) {
- /* check and free the memory */
- if (flow)
- rte_free(flow);
-
+ rte_free(flow);
rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
"Failed to create flow.");