aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-06-24 14:03:09 +0000
committerWerner Koch <[email protected]>2009-06-24 14:03:09 +0000
commit2e0ce7d97f0de998cdf8e95e17ce169b7cae91cd (patch)
treec4042057b382f755d3bc1799e9c78d3355436fa2 /agent/protect.c
parentPost release updates (diff)
downloadgnupg-2e0ce7d97f0de998cdf8e95e17ce169b7cae91cd.tar.gz
gnupg-2e0ce7d97f0de998cdf8e95e17ce169b7cae91cd.zip
Fixed a bunch of little bugs as reported by Fabian Keil.
Still one problem left; marked with a gcc #warning.
Diffstat (limited to 'agent/protect.c')
-rw-r--r--agent/protect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/protect.c b/agent/protect.c
index 8b022ecfb..d6457ad2a 100644
--- a/agent/protect.c
+++ b/agent/protect.c
@@ -176,8 +176,11 @@ do_encryption (const unsigned char *protbegin, size_t protlen,
iv = xtrymalloc (blklen*2+8);
if (!iv)
rc = gpg_error (GPG_ERR_ENOMEM);
- gcry_create_nonce (iv, blklen*2+8);
- rc = gcry_cipher_setiv (hd, iv, blklen);
+ else
+ {
+ gcry_create_nonce (iv, blklen*2+8);
+ rc = gcry_cipher_setiv (hd, iv, blklen);
+ }
}
if (!rc)
{