[pacman-dev] _alpm_key_import: Initialise fetch_key

Message ID 20210905000110.821025-1-allan@archlinux.org
State New
Headers show
Series [pacman-dev] _alpm_key_import: Initialise fetch_key | expand

Commit Message

Allan McRae Sept. 5, 2021, 12:01 a.m. UTC
Prevents build warning.

Signed-off-by: Allan McRae <allan@archlinux.org>
---

Missed this in my testing as I was building in release mode. Luckily
our gitlab CI noticed!

 lib/libalpm/signing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 443682b5..d5cfcfe1 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -495,7 +495,7 @@  static int email_from_uid(const char *uid, char **email)
 int _alpm_key_import(alpm_handle_t *handle, const char *uid, const char *fpr)
 {
 	int ret = -1;
-	alpm_pgpkey_t fetch_key;
+	alpm_pgpkey_t fetch_key = {0};
 	char *email;
 
 	if(_alpm_access(handle, handle->gpgdir, "pubring.gpg", W_OK)) {