The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
27. At the (moment of) departing (he frees himself from his works), there being nothing to be reached (by him, on the way to Brahman, through those works); for thus others (declare, in their sacred texts).
The Kaushîtakins record in the paryaṅka-vidyâ how the man (who possesses true knowledge) when approaching Brahman seated on the couch frees himself on the way from his good and evil deeds, 'He having reached the path of the gods comes to the world of Agni,' &c. (Kau. Up. I, 3), and later on (I, 4), 'He comes to the river Vigarâ and crosses it by the mind alone and there shakes off his good and evil deeds.'--The question here arises whether in strict agreement with the text we have to understand that the deceased man frees himself from his good and evil deeds on the way to Brahman, or rather that he does so at the outset when he departs from his body.
The letter of the text favouring the former alternative, the Sûtrakâra rebuts it by declaring 'at the going,' i.e. at the time of departing from the body the man frees himself, through the strength of his knowledge, from his good and evil deeds. The reason for this averment is assigned in the words, 'On account of the absence of anything to be reached.' For when the man possessing true knowledge has departed from the body and is, through his knowledge, about to reach Brahman, there exists nothing to be reached by him on the way through his good and evil works, and we therefore have no reason to assume the latter to remain uneffaced during a certain number of moments. We rather have to conclude that as the results of his good and evil works are contrary to the result of knowledge, they are destroyed by the power of the latter; and that hence the moment of their destruction is that moment in which he sets out toward the fruit of his knowledge (i.e. the world of Brahman).--The conclusion thus is that the deliverance of the man from his works takes place early, and is only mentioned later on in the text of the Kaushîtakins.--Thus other Sâkhâs also, as that of the Tândins and Sâtyâyanins, declare that he frees himself from his deeds at an earlier stage; cp. the passages, 'Shaking off all evil as a horse shakes his hair,' and 'His sons obtain his inheritance, his friends the good, his enemies the evil he has done.'