summaryrefslogtreecommitdiffstats
path: root/kbx/keybox-blob.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-04-15 16:40:48 +0200
committerWerner Koch <wk@gnupg.org>2014-04-16 10:18:17 +0200
commita34afa8f2053d75f276d6d28dbf1a43db0fd9768 (patch)
tree68526edee70449f07cea73af77424664193a559f /kbx/keybox-blob.c
parentgpg: Re-enable secret key deletion. (diff)
downloadgnupg2-a34afa8f2053d75f276d6d28dbf1a43db0fd9768.tar.xz
gnupg2-a34afa8f2053d75f276d6d28dbf1a43db0fd9768.zip
Two minor code cleanups and one NULL deref on error fix.
* common/estream.c (es_freopen): Remove useless check for STREAM. * kbx/keybox-blob.c (_keybox_create_x509_blob): Remove useless check for BLOB. * tools/sockprox.c (run_proxy): Do not fclose(NULL). -- Found by Hans-Christoph Steiner with cppcheck.
Diffstat (limited to 'kbx/keybox-blob.c')
-rw-r--r--kbx/keybox-blob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kbx/keybox-blob.c b/kbx/keybox-blob.c
index a38f991a9..ebbcdf8ff 100644
--- a/kbx/keybox-blob.c
+++ b/kbx/keybox-blob.c
@@ -948,12 +948,12 @@ _keybox_create_x509_blob (KEYBOXBLOB *r_blob, ksba_cert_t cert,
leave:
release_kid_list (blob->temp_kids);
blob->temp_kids = NULL;
- if (blob && names)
+ if (names)
{
for (i=0; i < blob->nuids; i++)
xfree (names[i]);
+ xfree (names);
}
- xfree (names);
if (rc)
{
_keybox_release_blob (blob);