File tcsh-6.18.01-blk_buf.patch of Package tcsh.12475

--- tc.str.c
+++ tc.str.c	2012-05-10 07:57:01.358065084 +0000
@@ -590,10 +590,14 @@ bb_cleanup(void *xbb)
     struct blk_buf *bb;
     size_t i;
 
-    bb = xbb;
-    for (i = 0; i < bb->len; i++)
-	xfree(bb->vec[i]);
-    xfree(bb->vec);
+    bb = (struct blk_buf *)xbb;
+    if (bb->vec) {
+	for (i = 0; i < bb->len; i++)
+	    xfree(bb->vec[i]);
+	xfree(bb->vec);
+    }
+    bb->vec = (Char**)0;
+    bb->len = 0;
 }
 
 void
openSUSE Build Service is sponsored by