libpfrng: check for mutex lock/unlock errors