Browse files

Avoid leaking handles if a batch task gives an error.

  • Loading branch information...
1 parent 516451b commit d6c5a807110a7ec6ecde9ad59dd7e3b35891fb5e @dpage dpage committed Feb 7, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 job.cpp
View
1 job.cpp
@@ -245,6 +245,7 @@ int Job::Execute()
{
output.Printf(_("Couldn't execute script: %s, GetLastError() returned %d, errno = %d"), filename.c_str(), GetLastError(), errno);
LogMessage(output, LOG_WARNING);
+ CloseHandle(h_process);
rc = -1;
break;
}

0 comments on commit d6c5a80

Please sign in to comment.