md: fix problems with freeing private data after ->run failure.