]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
xen-blkfront: fix memory leak in xbd_connect error path
authorroyger <royger@FreeBSD.org>
Mon, 30 Jul 2018 11:27:51 +0000 (11:27 +0000)
committerroyger <royger@FreeBSD.org>
Mon, 30 Jul 2018 11:27:51 +0000 (11:27 +0000)
commit13fa38d951463f48d8ef4e89790f8ccd0481a81a
treeebad1910fd1f4c9b564ca98ac800e8e1e9486737
parentbed19de064eb3f9673393cd8a8cb14e1dd8d8517
xen-blkfront: fix memory leak in xbd_connect error path

If gnttab_grant_foreign_access() fails for any of the indirection
pages, the code breaks out of both the loops without freeing the local
variable indirectpages, causing a memory leak.

Submitted by: Pratyush Yadav <pratyush@freebsd.org>
Differential Review: https://reviews.freebsd.org/D16136
sys/dev/xen/blkfront/blkfront.c