X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=lib%2Flibrte_sched%2Frte_sched.c;h=614705d81ed8cfbac7cf25484da86bd483d61601;hb=86f9f751005f8fa5a89eb18ac4c8a593322cc880;hp=e6dace2f679f09877964bb3ea34ed823f109be42;hpb=c300e3551a11a249b600463891a19a6792f42901;p=deb_dpdk.git diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index e6dace2f..614705d8 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -735,12 +735,14 @@ void rte_sched_port_free(struct rte_sched_port *port) { uint32_t qindex; - uint32_t n_queues_per_port = rte_sched_port_queues_per_port(port); + uint32_t n_queues_per_port; /* Check user parameters */ if (port == NULL) return; + n_queues_per_port = rte_sched_port_queues_per_port(port); + /* Free enqueued mbufs */ for (qindex = 0; qindex < n_queues_per_port; qindex++) { struct rte_mbuf **mbufs = rte_sched_port_qbase(port, qindex);