Free pointer returned by `basename`