Charles Leclerc was able to just edge out Sergio Perez in the second free practice session at the Azerbaijan Grand Prix, taking P1 ahead of the updated Red Bull.