summaryrefslogtreecommitdiff
path: root/src/benchmark-cipher.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-09-11 11:23:15 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-09-11 11:23:15 +0200
commitd25ad79a91d78e8816a152d7b6344c071834b8ad (patch)
tree048cf9a23b8191b2cc6fd4ba3eb5679622251f58 /src/benchmark-cipher.c
parent202ad3d9632569f26eccd52642d2409ae9a1e35b (diff)
downloadgnutls-d25ad79a91d78e8816a152d7b6344c071834b8ad.tar.gz
tests/tools: avoid non-null check before free()
Diffstat (limited to 'src/benchmark-cipher.c')
-rw-r--r--src/benchmark-cipher.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/benchmark-cipher.c b/src/benchmark-cipher.c
index 15ae615062..ba1b929b9b 100644
--- a/src/benchmark-cipher.c
+++ b/src/benchmark-cipher.c
@@ -67,8 +67,7 @@ static void cipher_mac_bench(int algo, int mac_algo, int size)
_iv = malloc(ivsize);
if (_iv == NULL) {
- if (_key)
- free(_key);
+ free(_key);
return;
}
memset(_iv, 0xf0, ivsize);