tls: Fix an invalid free on CBC encryption failure
authorMartin Willi <martin@revosec.ch>
Wed, 15 Oct 2014 12:26:03 +0000 (14:26 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 15 Oct 2014 12:26:03 +0000 (14:26 +0200)
src/libtls/tls_aead_expl.c

index 37779a1..80b0db3 100644 (file)
@@ -91,7 +91,6 @@ METHOD(tls_aead_t, encrypt, bool,
        /* encrypt inline */
        if (!this->crypter->encrypt(this->crypter, *data, iv, NULL))
        {
-               free(data->ptr);
                return FALSE;
        }
        /* prepend IV */