It was at least an ambiguous end. He's going off to become an officer. If he does, his mother and him can live a more comfortable life, albeit never opulent again. If he dies, his mother's screwed over.
That reminds me how much of a douche DuBray (DuPray?) was in the book. Has over a million spare francs IN HIS FUCKING POCKET, the retreating Morcerf mother and son telling him of their situation, considering less than a thousand francs a forturne, and he just looks sad and offers them his condolences.