On this daf, we find the case of a person who sinned so seriously that he must be buried among the utterly wicked.
The Zohar reveals that a child who acts as is proper and does mitzvos causes his parent to continue climbing even after he or she departs from the material world. This is why it is so important for a son to say Kaddish for his departed parent. Even if the parent was utterly wicked, Kaddish can elevate his soul.
The Sefer Chassidim tells about a chochom who would promise various amounts of tzedakah for the souls of his departed relatives. When asked why he did so, he explained: “After all, I have received great good from them in their lifetime and continue to benefit. Isn’t it only proper for me to return something to them? Besides, I am sure that this good deed—like every other—will surely aid me as well.”
The Sefer Chassidim concludes: “Even the child of a wicked person can redeem himself through tzedakah” (Sefer Chassidim, #170).