hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1028426 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Thu, 28 Oct 2010 18:49:17 GMT
Author: mahadev
Date: Thu Oct 28 18:49:17 2010
New Revision: 1028426

URL: http://svn.apache.org/viewvc?rev=1028426&view=rev
Log:
ZOOKEEPER-898. C Client might not cleanup correctly during close (jared cantwell via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/src/zookeeper.c

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1028426&r1=1028425&r2=1028426&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Oct 28 18:49:17 2010
@@ -142,6 +142,9 @@ BUGFIXES: 
 
   ZOOKEEPER-897. C Client seg faults during close (jared cantwell via mahadev)
 
+  ZOOKEEPER-898. C Client might not cleanup correctly during close 
+  (jared cantwell via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=1028426&r1=1028425&r2=1028426&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Thu Oct 28 18:49:17 2010
@@ -2229,14 +2229,15 @@ static int add_completion(zhandle_t *zh,
     lock_completion_list(&zh->sent_requests);
     if (zh->close_requested != 1) {
         queue_completion_nolock(&zh->sent_requests, c, add_to_front);
+        if (dc == SYNCHRONOUS_MARKER) {
+            zh->outstanding_sync++;
+        }
         rc = ZOK;
     } else {
+        free(c);
         rc = ZINVALIDSTATE;
     }
     unlock_completion_list(&zh->sent_requests);
-    if (dc == SYNCHRONOUS_MARKER) {
-        zh->outstanding_sync++;
-    }
     return rc;
 }
 



Mime
View raw message