aboutsummaryrefslogtreecommitdiffstats
path: root/common/estream.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-04-15 14:40:48 +0000
committerWerner Koch <[email protected]>2014-04-16 08:18:17 +0000
commita34afa8f2053d75f276d6d28dbf1a43db0fd9768 (patch)
tree68526edee70449f07cea73af77424664193a559f /common/estream.c
parentgpg: Re-enable secret key deletion. (diff)
downloadgnupg-a34afa8f2053d75f276d6d28dbf1a43db0fd9768.tar.gz
gnupg-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 'common/estream.c')
-rw-r--r--common/estream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/estream.c b/common/estream.c
index be791a802..6272c81f5 100644
--- a/common/estream.c
+++ b/common/estream.c
@@ -3101,7 +3101,7 @@ es_freopen (const char *ES__RESTRICT path, const char *ES__RESTRICT mode,
}
else
{
- if (stream && path)
+ if (path)
fname_set_internal (stream, path, 1);
ESTREAM_UNLOCK (stream);
}