These three problems were found by coverity during the run documented
here:
https://bugzilla.redhat.com/show_bug.cgi?id=732015
The three fixes are all very simple, but sufficiently unrelated (other
than the method used for finding them) to warrant separate patches.