usrloc: fix crash while printing error log
 - fix a copy/paste error that lead to a NULL pointer

(cherry picked from commit 10115f88637d1371a8ddeb5fe9c36c31ada49fc4)