Fix double-free() crash when using 'mdp add' without prefix (found by Vlad Glagolev).