[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mini-os master] mini-os: fix double free() in netfront



commit 1eeb57067a3e12ab6d5f01f9bdc719ee70cbc8fc
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Thu Apr 9 16:12:38 2020 +0200
Commit:     Wei Liu <liuw@xxxxxxxxx>
CommitDate: Thu Apr 9 15:40:10 2020 +0100

    mini-os: fix double free() in netfront
    
    Commit d225f4012d69a19 ("Save/Restore Support: Add suspend/restore
    support for netfront") introduced a regression in form of freeing a
    netfront device structure twice.
    
    Fix that.
    
    Coverity-ID: 1433637
    Fixes: d225f4012d69a19 ("Save/Restore Support: Add suspend/restore support 
for netfront")
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
    Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 netfront.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/netfront.c b/netfront.c
index 50b3a57..fe7bb62 100644
--- a/netfront.c
+++ b/netfront.c
@@ -584,8 +584,6 @@ void shutdown_netfront(struct netfront_dev *dev)
     list->refcount--;
     if (list->refcount == 0) {
         _shutdown_netfront(dev);
-        free(dev->nodename);
-        free(dev);
 
         to_del = list;
         if (to_del == dev_list) {
--
generated by git-patchbot for /home/xen/git/mini-os.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.