add missing free in free_mds