Coverity-found bug: don't use temp->next *before* checking it for NULL. Also
return rather than use it again.
1 file changed