diff --git a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
index 376dee3..b5236b9 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
@@ -47,7 +47,6 @@ public function checkRedirectUrl(FilterResponseEvent $event) {
     if ($response instanceOf RedirectResponse) {
       $options = array();
 
-      $redirect_path = $response->getTargetUrl();
       $destination = $event->getRequest()->query->get('destination');
       // A destination in $_GET always overrides the current RedirectResponse.
       // We do not allow absolute URLs to be passed via $_GET, as this can be an
