diff options
| author | miod <> | 2014-04-13 15:25:35 +0000 |
|---|---|---|
| committer | miod <> | 2014-04-13 15:25:35 +0000 |
| commit | d2b3c9742a7df4ab87384039c99682d1944f66d7 (patch) | |
| tree | 74f4ff344980894c7c9ceeab9b81176ac7572566 /src/lib/libcrypto/evp/digest.c | |
| parent | dbf195d7fd4efbe4ee578f1dc5c72e7f3deadf18 (diff) | |
| download | openbsd-d2b3c9742a7df4ab87384039c99682d1944f66d7.tar.gz openbsd-d2b3c9742a7df4ab87384039c99682d1944f66d7.tar.bz2 openbsd-d2b3c9742a7df4ab87384039c99682d1944f66d7.zip | |
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'src/lib/libcrypto/evp/digest.c')
| -rw-r--r-- | src/lib/libcrypto/evp/digest.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c index 467e6b5ae9..d14e8e48d5 100644 --- a/src/lib/libcrypto/evp/digest.c +++ b/src/lib/libcrypto/evp/digest.c | |||
| @@ -267,6 +267,7 @@ int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) | |||
| 267 | return FIPS_digestfinal(ctx, md, size); | 267 | return FIPS_digestfinal(ctx, md, size); |
| 268 | #else | 268 | #else |
| 269 | int ret; | 269 | int ret; |
| 270 | |||
| 270 | OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); | 271 | OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); |
| 271 | ret=ctx->digest->final(ctx,md); | 272 | ret=ctx->digest->final(ctx,md); |
| 272 | if (size != NULL) | 273 | if (size != NULL) |
| @@ -365,8 +366,11 @@ int EVP_Digest(const void *data, size_t count, | |||
| 365 | 366 | ||
| 366 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) | 367 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) |
| 367 | { | 368 | { |
| 368 | EVP_MD_CTX_cleanup(ctx); | 369 | if (ctx) |
| 369 | OPENSSL_free(ctx); | 370 | { |
| 371 | EVP_MD_CTX_cleanup(ctx); | ||
| 372 | OPENSSL_free(ctx); | ||
| 373 | } | ||
| 370 | } | 374 | } |
| 371 | 375 | ||
| 372 | /* This call frees resources associated with the context */ | 376 | /* This call frees resources associated with the context */ |
