On Tue, 27 May 2008, [EMAIL PROTECTED] wrote:

File Name: /srclib/apr-util/misc/apr_reslist.c
Function Name: reslist_cleanup()
Buggy Code:

  144:     apr_thread_mutex_lock(rl->listlock);
  145:
  146:     while (rl->nidle > 0) {
  147:         res = pop_resource(rl);
  148:         rl->ntotal--;
  149:         rv = destroy_resource(rl, res);
  150:         if (rv != APR_SUCCESS)
  151:             return rv;
            // the execution of apr_thread_mutex_unlock() is missed.

That return looks like a relatively serious issue.  Shouldn't
the cleanup plough on and destroy_resource on every resource
(i.e. while ntotal > 0) regardless in that loop?

--
Nick Kew

Reply via email to