Update manager.c

added memfree