md: Null check allocated mem pools before releasing
If there is any error during construction of dm-req-crypt based device,
it calls for dm-req-crypt destruction. In destructor, it calls for
kmem_cache_destroy without checking if corresponding pools were allocated.
This causes device to crash. Adding null checks to ensure mem pools are
released only if those were allocated.
Change-Id: I07da1635cc99696b231aeace834855613862213f
Signed-off-by:
Dinesh K Garg <dineshg@codeaurora.org>
Loading
Please register or sign in to comment