@@ -6674,10 +6674,7 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt(char *data, size_t data_len, ch
6674
6674
& iv , & iv_len , & free_iv , NULL , tag_len , options , 1 ) == FAILURE ||
6675
6675
php_openssl_cipher_update (cipher_type , cipher_ctx , & mode , & outbuf , & outlen ,
6676
6676
data , data_len , aad , aad_len , 1 ) == FAILURE ) {
6677
- if (outbuf )
6678
- zend_string_release_ex (outbuf , 0 );
6679
6677
outbuf = NULL ;
6680
- goto cleanup ;
6681
6678
} else if (EVP_EncryptFinal (cipher_ctx , (unsigned char * )ZSTR_VAL (outbuf ) + outlen , & i )) {
6682
6679
outlen += i ;
6683
6680
if (options & OPENSSL_RAW_DATA ) {
@@ -6718,7 +6715,6 @@ PHP_OPENSSL_API zend_string* php_openssl_encrypt(char *data, size_t data_len, ch
6718
6715
outbuf = NULL ;
6719
6716
}
6720
6717
6721
- cleanup :
6722
6718
if (free_password ) {
6723
6719
efree (password );
6724
6720
}
@@ -6799,10 +6795,7 @@ PHP_OPENSSL_API zend_string* php_openssl_decrypt(char *data, size_t data_len, ch
6799
6795
& iv , & iv_len , & free_iv , tag , tag_len , options , 0 ) == FAILURE ||
6800
6796
php_openssl_cipher_update (cipher_type , cipher_ctx , & mode , & outbuf , & outlen ,
6801
6797
data , data_len , aad , aad_len , 0 ) == FAILURE ) {
6802
- if (outbuf )
6803
- zend_string_release_ex (outbuf , 0 );
6804
6798
outbuf = NULL ;
6805
- goto cleanup ;
6806
6799
} else if (mode .is_single_run_aead ||
6807
6800
EVP_DecryptFinal (cipher_ctx , (unsigned char * )ZSTR_VAL (outbuf ) + outlen , & i )) {
6808
6801
outlen += i ;
@@ -6814,7 +6807,6 @@ PHP_OPENSSL_API zend_string* php_openssl_decrypt(char *data, size_t data_len, ch
6814
6807
outbuf = NULL ;
6815
6808
}
6816
6809
6817
- cleanup :
6818
6810
if (free_password ) {
6819
6811
efree (password );
6820
6812
}
0 commit comments