summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-02-10 03:43:53 +0000
committerChristian Pointner <equinox@anytun.org>2014-02-10 03:43:53 +0000
commita6ba8d2faa437cfa171834cbcbe81317750b27b7 (patch)
treee6756066af57c2ee01f7db2fb9d8c6ad361f052b
parentmoved less invasive check for mux value to the top (diff)
clang --analyze yielded bugs
-rw-r--r--src/cipher.c4
-rw-r--r--src/seq_window.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/cipher.c b/src/cipher.c
index 5040686..d6eae57 100644
--- a/src/cipher.c
+++ b/src/cipher.c
@@ -241,10 +241,8 @@ void cipher_aesctr_close(cipher_t* c)
if(c->params_) {
#ifndef USE_SSL_CRYPTO
cipher_aesctr_param_t* params = c->params_;
- if(params->handle_)
- gcry_cipher_close(params->handle_);
+ gcry_cipher_close(params->handle_);
#endif
-
free(c->params_);
}
}
diff --git a/src/seq_window.c b/src/seq_window.c
index 3a1355f..5adf5b3 100644
--- a/src/seq_window.c
+++ b/src/seq_window.c
@@ -81,7 +81,7 @@ seq_win_element_t* seq_win_new_element(sender_id_t sender_id, seq_nr_t max, wind
e->sender_id_ = sender_id;
e->max_ = max;
e->pos_ = 0;
- e->window_ = malloc(sizeof(seq_nr_t)*size);
+ e->window_ = malloc(sizeof((*e->window_))*size);
if(!e->window_) {
free(e);
return NULL;