Correct potenital locking issue in msg allocation

No match.