Fix 'Unintialized pointer read'

Catch by https://scan.coverity.com

https://bugzilla.gnome.org/show_bug.cgi?id=730320
Fix 'Uninitialized scalar variable'

Catch by https://scan.coverity.com

https://bugzilla.gnome.org/show_bug.cgi?id=730320
Fix 'Logically dead code'

Catch by https://scan.coverity.com

https://bugzilla.gnome.org/show_bug.cgi?id=730320