Author: svn-role
Date: Mon Sep 10 13:09:48 2012
New Revision: 1382815

URL: http://svn.apache.org/viewvc?rev=1382815&view=rev
Log:
Reintegrate the 1.6.x-r1330410 branch:

 * r1330410, r1330554
   Fix an error leak in the hook script invocation code.
   Justification:
     This bug can cause a server process to hang.
   Notes:
     - r1330410 was merged from trunk and fixes the bug.
     - r1330554 is a 1.6.x-specific follow-up fix that prevents the bug fix
        from changing control flow such that a file handle is closed which
        was never opened.
   Branch:
     ^/subversion/branches/1.6.x-r1330410
   Votes:
     +1: stsp, philip, cmpilato

Modified:
    subversion/branches/1.6.x/   (props changed)
    subversion/branches/1.6.x/STATUS
    subversion/branches/1.6.x/subversion/libsvn_repos/hooks.c

Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1330410
  Merged /subversion/branches/1.6.x-r1330410:r1330546-1382814

Modified: subversion/branches/1.6.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=1382815&r1=1382814&r2=1382815&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Mon Sep 10 13:09:48 2012
@@ -81,20 +81,6 @@ Approved changes:
    Votes:
      +1: stsp, philip, cmpilato
 
- * r1330410, r1330554
-   Fix an error leak in the hook script invocation code.
-   Justification:
-     This bug can cause a server process to hang.
-   Notes:
-     - r1330410 was merged from trunk and fixes the bug.
-     - r1330554 is a 1.6.x-specific follow-up fix that prevents the bug fix
-        from changing control flow such that a file handle is closed which
-        was never opened.
-   Branch:
-     ^/subversion/branches/1.6.x-r1330410
-   Votes:
-     +1: stsp, philip, cmpilato
-
  * r1338810, r1339164, r1339154
    Fix issue #4184 ("partial svnsync drops properties when converting
    copies to adds").

Modified: subversion/branches/1.6.x/subversion/libsvn_repos/hooks.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_repos/hooks.c?rev=1382815&r1=1382814&r2=1382815&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_repos/hooks.c Mon Sep 10 
13:09:48 2012
@@ -269,7 +269,7 @@ run_hook_cmd(svn_string_t **result,
     return svn_error_wrap_apr
       (apr_err, _("Error closing read end of stderr pipe"));
 
-  if (result)
+  if (!err && result)
     {
       svn_stringbuf_t *native_stdout;
       SVN_ERR(svn_stringbuf_from_aprfile(&native_stdout, read_outhandle, 
pool));
@@ -280,7 +280,7 @@ run_hook_cmd(svn_string_t **result,
 
       *result = svn_string_create_from_buf(native_stdout, pool);
     }
-  else
+  else if (!result)
     {
       apr_err = apr_file_close(null_handle);
       if (!err && apr_err)


Reply via email to