dm snapshot persistent: fix missing cleanup in persistent_ctr error path
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 13 Oct 2015 08:03:08 +0000 (13:33 +0530)
committerMike Snitzer <snitzer@redhat.com>
Tue, 13 Oct 2015 16:20:54 +0000 (12:20 -0400)
commita2a678ed4d0d6cb5f36dbabc411d60d9a4f9c435
treed2934b441fbc1235335e284dca65c1bfff2f76a5
parent25cb62b76430a91cc6195f902e61c2cb84ade622
dm snapshot persistent: fix missing cleanup in persistent_ctr error path

If an unsupported option is given then the early return from
persistent_ctr() leaked memory allocated for the 'pstore' and never
destroyed the 'metadata_wq'.

Fixes: b0d3cc011e53 ("dm snapshot: add new persistent store option to support overflow")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-snap-persistent.c