free null cleanup finale

Don't check for NULL before calling OPENSSL_free

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz
2015-05-01 10:02:07 -04:00
parent 33fbca83dc
commit b548a1f11c
173 changed files with 509 additions and 1012 deletions

View File

@@ -889,11 +889,9 @@ static int cryptodev_digest_cleanup(EVP_MD_CTX *ctx)
return (0);
}
if (state->mac_data) {
OPENSSL_free(state->mac_data);
state->mac_data = NULL;
state->mac_len = 0;
}
OPENSSL_free(state->mac_data);
state->mac_data = NULL;
state->mac_len = 0;
if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) < 0) {
printf("cryptodev_digest_cleanup: failed to close session\n");