net/i40e: add private APIs for flow filtering
[dpdk.git] / drivers / net / mlx4 / mlx4_flow.c
index 793f0b0..2a86382 100644 (file)
@@ -980,12 +980,13 @@ mlx4_drop_get(struct mlx4_priv *priv)
        priv->drop = drop;
        return drop;
 error:
-       if (drop->qp)
-               claim_zero(mlx4_glue->destroy_qp(drop->qp));
-       if (drop->cq)
-               claim_zero(mlx4_glue->destroy_cq(drop->cq));
-       if (drop)
+       if (drop) {
+               if (drop->qp)
+                       claim_zero(mlx4_glue->destroy_qp(drop->qp));
+               if (drop->cq)
+                       claim_zero(mlx4_glue->destroy_cq(drop->cq));
                rte_free(drop);
+       }
        rte_errno = ENOMEM;
        return NULL;
 }