vhost: remove unnecessary free
authorJiayu Hu <jiayu.hu@intel.com>
Tue, 20 Apr 2021 08:57:44 +0000 (04:57 -0400)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 28 Apr 2021 01:24:04 +0000 (03:24 +0200)
This patch removes unnecessary rte_free() for async_pkts_info
and async_descs_split.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
lib/vhost/vhost_user.c

index cdd46a0..fa8929f 100644 (file)
@@ -2013,13 +2013,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
        } else {
                rte_free(vq->shadow_used_split);
                vq->shadow_used_split = NULL;
-
-               if (vq->async_pkts_info)
-                       rte_free(vq->async_pkts_info);
-               if (vq->async_descs_split)
-                       rte_free(vq->async_descs_split);
-               vq->async_pkts_info = NULL;
-               vq->async_descs_split = NULL;
        }
 
        rte_free(vq->batch_copy_elems);