[PATCH] vhost: fix null pointer dereference
Weiguo Li
liwg06 at foxmail.com
Sat Jan 29 20:07:35 CET 2022
Fixes: 155ee3542fb1 ("vhost: improve vhost-user layer logs")
Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
---
lib/vhost/vhost_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index e8297a09eb..d032998488 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -671,7 +671,7 @@ numa_realloc(struct virtio_net *dev, int index)
dev = rte_realloc_socket(old_dev, sizeof(*dev), 0, node);
if (!dev) {
VHOST_LOG_CONFIG(ERR, "(%s) failed to realloc dev on node %d\n",
- dev->ifname, node);
+ old_dev->ifname, node);
return old_dev;
}
--
2.25.1
More information about the dev
mailing list