diff options
author | Jens Axboe <axboe@fb.com> | 2017-05-15 23:33:06 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-05-15 23:33:06 +0200 |
commit | d3f7c35c1ab33e6aa035407fed38d9149858bed7 (patch) | |
tree | 74dd68fc021d3089e5fc0083a1712e171ec1b2a4 | |
parent | drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub() (diff) | |
parent | block: xen-blkback: add null check to avoid null pointer dereference (diff) | |
download | linux-d3f7c35c1ab33e6aa035407fed38d9149858bed7.tar.xz linux-d3f7c35c1ab33e6aa035407fed38d9149858bed7.zip |
Merge branch 'stable/for-jens-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus
Pull a single fix from Konrad.
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 8fe61b5dc5a6..1f3dfaa54d87 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -504,11 +504,13 @@ static int xen_blkbk_remove(struct xenbus_device *dev) dev_set_drvdata(&dev->dev, NULL); - if (be->blkif) + if (be->blkif) { xen_blkif_disconnect(be->blkif); - /* Put the reference we set in xen_blkif_alloc(). */ - xen_blkif_put(be->blkif); + /* Put the reference we set in xen_blkif_alloc(). */ + xen_blkif_put(be->blkif); + } + kfree(be->mode); kfree(be); return 0; |