[PATCH] testbot/web: Remove pointless 'cleanup' Submit.pl code.

Francois Gouget fgouget at codeweavers.com
Thu May 31 04:00:20 CDT 2018


Objects are freed when they get out of scope. So there is no point
setting $Jobs to undef.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/web/Submit.pl | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 2b4e5ec14..2a4521edc 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -871,21 +871,17 @@ sub OnSubmit($)
     return !1;
   }
 
-  # Clean up, but save the key of the new job
-  my $JobKey = $NewJob->GetKey();
-  $Jobs = undef;
-
   # Notify engine
   my $ErrMessage = RescheduleJobs();
   if (defined $ErrMessage)
   {
     $self->{ErrMessage} = $ErrMessage;
     $self->{Page} = 4;
-    $self->{JobKey} = $JobKey;
+    $self->{JobKey} = $NewJob->GetKey();
     return !1;
   }
 
-  $self->Redirect("/JobDetails.pl?Key=$JobKey"); # does not return
+  $self->Redirect("/JobDetails.pl?Key=". $NewJob->GetKey()); # does not return
   exit;
 }
 
-- 
2.17.0



More information about the wine-devel mailing list