X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvhost%2Fmain.c;h=3a35359b87e6eb0f935fd32178da38a5c1c61534;hb=51ec3ae2afaca9b2a76b43bde272edeac8174147;hp=04f01182d0d3274fd9789078ab7ae07e0818d5cc;hpb=5404002d3ce435d9c8b21ff83168c7b706802090;p=dpdk.git diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 04f01182d0..3a35359b87 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1308,8 +1308,8 @@ switch_worker(__attribute__((unused)) void *arg) /* If this is the first received packet we need to learn the MAC and setup VMDQ */ if (unlikely(vdev->ready == DEVICE_MAC_LEARNING) && tx_count) { if (vdev->remove || (link_vmdq(vdev, pkts_burst[0]) == -1)) { - while (tx_count--) - rte_pktmbuf_free(pkts_burst[tx_count]); + while (tx_count) + rte_pktmbuf_free(pkts_burst[--tx_count]); } } while (tx_count)