lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210618065307.183-1-caihuoqing@baidu.com>
Date:   Fri, 18 Jun 2021 14:53:07 +0800
From:   Cai Huoqing <caihuoqing@...du.com>
To:     <mst@...hat.com>, <jasowang@...hat.com>
CC:     <kvm@...r.kernel.org>, <virtualization@...ts.linux-foundation.org>,
        <netdev@...r.kernel.org>, Cai Huoqing <caihuoqing@...du.com>
Subject: [PATCH] vhost-vdpa: fix bug-"v->vqs" and "v" don't free

"v->vqs" and "v" don't free when "cdev_device_add" returns error

Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
 drivers/vhost/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index fb41db3da611..6e5d5df5ee70 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -1065,6 +1065,8 @@ static int vhost_vdpa_probe(struct vdpa_device *vdpa)
 
 err:
        put_device(&v->dev);
+       kfree(v->vqs);
+       kfree(v);
        return r;
 }
 
-- 
2.22.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ