(hx509_crypto_encrypt): free correctly in error path. From Andrew Bartlett.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17520 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-05-08 20:34:48 +00:00
parent 76393e42c3
commit 64bc25c77b

View File

@@ -1577,7 +1577,7 @@ hx509_crypto_encrypt(hx509_crypto crypto,
free(ivec->data);
memset(ivec, 0, sizeof(*ivec));
}
if (ciphertext) {
if (*ciphertext) {
if ((*ciphertext)->data) {
free((*ciphertext)->data);
}