diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index ed72ca49677f..9074cf7087ad 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -1634,13 +1634,12 @@ static SSL_SESSION *php_openssl_session_get_cb(SSL *ssl, const unsigned char *se SSL_SESSION_up_ref(obj->session); session = obj->session; } - zval_ptr_dtor(&retval); } else if (Z_TYPE(retval) != IS_NULL) { zend_type_error("session_get_cb return type must be null or OpenSSLSession"); - return NULL; } } + zval_ptr_dtor(&retval); zval_ptr_dtor(&args[1]); *copy = 0;