md: fix a crash in mempool_free
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v6.0.17 by commit 842f222fc42a9239831e15b1fd49a51c546902cb. For more details please see the references link.