to wave goodbye to sb as they are leaving
wave sb off
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition