Fix memory leak in legacy/server/backup_phase2.c.