Well, it depends on which kinds of sins, he confessed and did not confess. When there were venial sins, then, of course, they were valid in confession. When the person had still not confessed mortal sins and the priest went away and gave the absolution, for there was no time, it was not the guilt of the penitent because the priest went away.
The penitent had the intention of confessing these mortal sins. And, as I see it, in this case, the confession was valid because you had the intention to confess your mortal sins. But it would be necessary, of course, that on the next occasion, you confess these mortal sins, which you had no time to confess.
Dear visitors of Gloria Dei and all who have already written or who will write a personal message to me. I am grateful for your attention, your kindness, for your spiritual support and especially for your sacrifices and prayers for me. God may reward you!