fix (gross) memory mismanagment in dm_packet_ensure_space