Fix issues with unintialized variable value usage
commitded66fbb62cdad37d577dc048e37f7cea7f7a4da
authorDan McGee <dan@archlinux.org>
Mon, 9 Apr 2012 05:42:04 +0000 (9 00:42 -0500)
committerDan McGee <dan@archlinux.org>
Mon, 9 Apr 2012 05:46:54 +0000 (9 00:46 -0500)
treeb80edeb140fccccbbd9abc6bd8d58c5bec331d57
parentca090e10d264e4999e321b0a0b43736a34aa11d9
Fix issues with unintialized variable value usage

Detected by clang scan-build static code analyzer.

* Don't attempt to free an uninitialized gpgme key variable
* Initialize answer variable before asking frontend a question
* Pass by reference instead of value if uninitialized fields are
  possible in download signal handler code
* Ensure we never call strlen() on NULL payload->remote_name value

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/dload.c
lib/libalpm/signing.c