In this paper, to decrease the traffic loss caused by multiple link failures, we consider the correlated risk among different connection requests when both the primary and backup paths are routed and assigned spectrum. Therefore, a novel shared-path protection algorithm is developed, named shared-path protection algorithm with correlated risk (SPP_CR), in flexible bandwidth optical networks. Based on the correlated risk, the routing can be diverse and the sharing in backup spectral resource will be restricted by SPP_CR algorithm, then the dropped traffic caused by simultaneous multiple failures between primary and backup path can be efficiently decreased. Simulation results show that, SPP_CR algorithm (i) achieves the higher successful service ratio (SSR) than traditional shared-path protection (SPP), shared-path protection with dynamic load balancing (SPP_DLB) and dedicated path protection (DPP); (ii) makes a better tradeoff in blocking probability, protection ratio (PR), average frequency slots consumed (AFSC) and redundancy ratio (RR) than SPP, SPP_DLB and DPP algorithms.