summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bignum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bignum.c b/src/bignum.c
index 36bd140d..e9c16dd1 100644
--- a/src/bignum.c
+++ b/src/bignum.c
@@ -103,5 +103,9 @@ void ssh_print_bignum(const char *which, bignum num) {
#endif
fprintf(stderr, "%s value: ", which);
fprintf(stderr, "%s\n", (hex == NULL) ? "(null)" : (char *) hex);
+#ifdef HAVE_LIBGCRYPT
SAFE_FREE(hex);
+#elif defined HAVE_LIBCRYPTO
+ OPENSSL_free(hex);
+#endif
}