[PATCH] mtd: Fix potential UAF for mtdswap_dev pointers