Message ID | 20200409141240.28876-2-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mini-os: fix several double frees and memory leaks | expand |
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@suse.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- > 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 >
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) {
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@suse.com> --- netfront.c | 2 -- 1 file changed, 2 deletions(-)