aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper.c
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2017-07-14 15:31:10 -0400
committerAndreas Schneider <asn@cryptomilk.org>2017-07-18 09:29:56 +0200
commit2f42296edd1bcef93f4232c68b0f1630cb6b363e (patch)
treea4d87e25a132688e229dd996a9bf7c1a69aefb6b /src/wrapper.c
parentd9ff44b46e29e21e491cc4b9de0535df5cf1cd18 (diff)
downloadlibssh-2f42296edd1bcef93f4232c68b0f1630cb6b363e.tar.gz
libssh-2f42296edd1bcef93f4232c68b0f1630cb6b363e.tar.xz
libssh-2f42296edd1bcef93f4232c68b0f1630cb6b363e.zip
wrapper: fix 4-space indentation in ssh_cipher_clear
Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/wrapper.c')
-rw-r--r--src/wrapper.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/wrapper.c b/src/wrapper.c
index 877b807b..60dc9fd1 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -105,29 +105,29 @@ static struct ssh_cipher_struct *cipher_new(int offset) {
void ssh_cipher_clear(struct ssh_cipher_struct *cipher){
#ifdef HAVE_LIBGCRYPT
- unsigned int i;
+ unsigned int i;
#endif
- if (cipher == NULL) {
- return;
- }
+ if (cipher == NULL) {
+ return;
+ }
#ifdef HAVE_LIBGCRYPT
- if(cipher->key) {
- for (i = 0; i < (cipher->keylen / sizeof(gcry_cipher_hd_t)); i++) {
- gcry_cipher_close(cipher->key[i]);
+ if (cipher->key) {
+ for (i = 0; i < (cipher->keylen / sizeof(gcry_cipher_hd_t)); i++) {
+ gcry_cipher_close(cipher->key[i]);
+ }
+ SAFE_FREE(cipher->key);
}
- SAFE_FREE(cipher->key);
- }
#endif
- if (cipher->ctx != NULL) {
- if (cipher->cleanup != NULL) {
- cipher->cleanup(cipher);
- }
+ if (cipher->ctx != NULL) {
+ if (cipher->cleanup != NULL) {
+ cipher->cleanup(cipher);
+ }
#ifdef HAVE_LIBCRYPTO
- EVP_CIPHER_CTX_free(cipher->ctx);
+ EVP_CIPHER_CTX_free(cipher->ctx);
#endif
- }
+ }
}
static void cipher_free(struct ssh_cipher_struct *cipher) {