Fix several issues found by covscan. Patches will follow.
Created attachment 12998 [details] patch for 4.6
Comment on attachment 12998 [details] patch for 4.6 LGTM.
Reassigning to Karolin for inclusion in 4.6.next.
Created attachment 13004 [details] Extra patch for v4-6
Hi Karolin, Extra patch is ready for 4.6. Thanks...
(In reply to Martin Schwenke from comment #5) Pushed to autobuild-v4-6-test.
(In reply to Karolin Seeger from comment #6) Pushed to v4-6-test. Closing out bug report. Thanks!