[2/4] vhost: remove unnecessary free

Message ID 1615985773-406787-3-git-send-email-jiayu.hu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series Refactor async vhost control path |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hu, Jiayu March 17, 2021, 12:56 p.m. UTC
  This patch removes unnecessary rte_free() for async_pkts_info
and async_descs_split.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/librte_vhost/vhost_user.c | 7 -------
 1 file changed, 7 deletions(-)
  

Comments

Maxime Coquelin March 29, 2021, 3:03 p.m. UTC | #1
On 3/17/21 1:56 PM, Jiayu Hu wrote:
> This patch removes unnecessary rte_free() for async_pkts_info
> and async_descs_split.
> 
> Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
>  lib/librte_vhost/vhost_user.c | 7 -------
>  1 file changed, 7 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index a60bb94..399675c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2010,13 +2010,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);