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

Re: [PATCH 1/3] mini-os: fix double free() in netfront



Juergen Gross, le jeu. 09 avril 2020 16:12:38 +0200, a ecrit:
> 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>

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) {
> -- 
> 2.16.4
> 



 


Rackspace

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