Right knowledge and right relase or right release and right knowledge In ten Noble path the sequence is right knowledge and right release. (Samma Nana and samma vimutti)

In SN 12.23 it says:

Dispassion is a vital condition for freedom.

virāgūpanisā vimutti,

Freedom is a vital condition for the knowledge of ending.

vimuttūpanisaṃ khayeñāṇaṃ.

https://suttacentral.net/sn12.23/en/sujato
SN 12.23 says: 


Khayeñāṇaṃ (knowledge of destruction of defilements) has freedom (from defilements) as its condition. 
Freedom (from defilements) has dispassion, disillusionment &amp; yathābhūtañāṇadassanan (truly knowing and seeing) as its conditions. 


Therefore, if following the sequence of dhammas in SN 12.23, "right knowledge" ("samma ñāṇa") in MN 117 would be yathābhūtañāṇadassanan and not khayeñāṇaṃ.