1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

wrapper: fix 4-space indentation in ssh_cipher_clear

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jon Simons
2017-07-14 15:31:10 -04:00
committed by Andreas Schneider
parent d9ff44b46e
commit 2f42296edd

View File

@@ -105,29 +105,29 @@ static struct ssh_cipher_struct *cipher_new(int offset) {
void ssh_cipher_clear(struct ssh_cipher_struct *cipher){ void ssh_cipher_clear(struct ssh_cipher_struct *cipher){
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_LIBGCRYPT
unsigned int i; unsigned int i;
#endif #endif
if (cipher == NULL) { if (cipher == NULL) {
return; return;
} }
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_LIBGCRYPT
if(cipher->key) { if (cipher->key) {
for (i = 0; i < (cipher->keylen / sizeof(gcry_cipher_hd_t)); i++) { for (i = 0; i < (cipher->keylen / sizeof(gcry_cipher_hd_t)); i++) {
gcry_cipher_close(cipher->key[i]); gcry_cipher_close(cipher->key[i]);
}
SAFE_FREE(cipher->key);
} }
SAFE_FREE(cipher->key);
}
#endif #endif
if (cipher->ctx != NULL) { if (cipher->ctx != NULL) {
if (cipher->cleanup != NULL) { if (cipher->cleanup != NULL) {
cipher->cleanup(cipher); cipher->cleanup(cipher);
} }
#ifdef HAVE_LIBCRYPTO #ifdef HAVE_LIBCRYPTO
EVP_CIPHER_CTX_free(cipher->ctx); EVP_CIPHER_CTX_free(cipher->ctx);
#endif #endif
} }
} }
static void cipher_free(struct ssh_cipher_struct *cipher) { static void cipher_free(struct ssh_cipher_struct *cipher) {