The two functions have only small overlap:
A risk manager may have a specialization area that is not related to portfolio management at all. For example operations risk (systems, security etc.). Or, they might be specialized on a deal, loan, customer etc level risk analysis / risk management and have no portfolio view at all
A portfolio manager may focus on portfolio aspects not related to risk (strategy, profitability metrics etc.)
The overlap area is called portfolio risk management. Portfolio risk managers look at the risks of the portfolio on a holistic basis, perform portfolio optimization exercises that take risk into account etc.