dm log: fix dm_io_client leak on error paths