block: free q->flush_rq in blk_init_allocated_queue error paths
authorDave Jones <davej@redhat.com>
Thu, 20 Mar 2014 21:03:58 +0000 (15:03 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:43 +0000 (12:54 -0600)
commit772344c501df889bdcb83517ca873e1f48798ede
treed354b0225c76b02d869347029e5ac04d4f47e1a5
parentd9ff410c224ed6880cde941886a86d657c795c31
block: free q->flush_rq in blk_init_allocated_queue error paths

Commit 7982e90c3a57 ("block: fix q->flush_rq NULL pointer crash on
dm-mpath flush") moved an allocation to blk_init_allocated_queue(), but
neglected to free that allocation on the error paths that follow.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
block/blk-core.c