Tcl Source Code

Artifact [7761704e61]
Login

Artifact 7761704e614b49818f8f0cde1b002978286b26ca:

Attachment "thr2.patch" to ticket [2511424fff] added by ferrieux 2009-05-04 06:19:28.
Index: generic/threadSpCmd.c
===================================================================
RCS file: /cvsroot/tcl/thread/generic/threadSpCmd.c,v
retrieving revision 1.28
diff -u -r1.28 threadSpCmd.c
--- generic/threadSpCmd.c	3 Dec 2008 20:55:35 -0000	1.28
+++ generic/threadSpCmd.c	3 May 2009 23:02:03 -0000
@@ -1038,15 +1040,16 @@
 static int
 RemoveCondv(char *name, int len)
 {
-    SpCondv *condvPtr = (SpCondv*)RemoveAnyItem(SP_CONDV, name, len);
-
+    SpCondv *condvPtr = GetCondv(name, len);
     if (condvPtr == NULL) {
         return -1;
     }
     if (!SpCondvFinalize(condvPtr)) {
+        PutCondv(condvPtr);
         return 0;
     }
-
+    PutCondv(condvPtr);
+    RemoveAnyItem(SP_CONDV, name, len);
     Tcl_Free((char*)condvPtr);
 
     return 1;