HomeFreeBSD

xen-blkfront: fix memory leak in xbd_connect error path

Description

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

Details

Provenance
roygerAuthored on
Parents
rS336895: xen-blkfront: fix length check
Branches
Unknown
Tags
Unknown