]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fixed cryptobox cleanup
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Mar 2016 15:35:43 +0000 (15:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Mar 2016 15:36:00 +0000 (15:36 +0000)
src/libcryptobox/cryptobox.c

index e5c3112687cbe35df993afaf930b7f3bb8807f4d..88da5b35fabfcb8311e712000e468885dc793092 100644 (file)
@@ -945,7 +945,7 @@ static void
 rspamd_cryptobox_cleanup (void *enc_ctx, void *auth_ctx,
                enum rspamd_cryptobox_mode mode)
 {
-       if (G_LIKELY (RSPAMD_CRYPTOBOX_MODE_25519)) {
+       if (G_LIKELY (mode == RSPAMD_CRYPTOBOX_MODE_25519)) {
                rspamd_explicit_memzero (auth_ctx, sizeof (poly1305_state));
        }
        else {