about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-13 18:35:19 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-13 18:35:19 +0000
commitb3d3d9742fc70e08af69d3fc9cb18035c25cd57d (patch)
treee728dd57a56a0362e6eadb814dec5891658fe551
parentdb70483fd383cb4dad1f84804a106572c7dfca0b (diff)
downloadglibc-b3d3d9742fc70e08af69d3fc9cb18035c25cd57d.tar.gz
glibc-b3d3d9742fc70e08af69d3fc9cb18035c25cd57d.tar.xz
glibc-b3d3d9742fc70e08af69d3fc9cb18035c25cd57d.zip
Update.
	* posix/runtests.c (run_a_test): If regcomp failed, reset last_pattern.
-rw-r--r--ChangeLog2
-rw-r--r--posix/runtests.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9da6608a2b..934de09599 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2003-11-13  Ulrich Drepper  <drepper@redhat.com>
 
+	* posix/runtests.c (run_a_test): If regcomp failed, reset last_pattern.
+
 	* posix/regcomp.c (parse_dup_op): Fail with REG_BADBR is first
 	number in {,} expression is larger.
 
diff --git a/posix/runtests.c b/posix/runtests.c
index 2a5ef6c820..ea1efb6bf1 100644
--- a/posix/runtests.c
+++ b/posix/runtests.c
@@ -71,6 +71,9 @@ run_a_test (int id, const struct a_test * t)
 	      puts (" OK.");
 	      return 0;
 	    }
+	  if (last_pattern)
+	    regfree (&r);
+	  last_pattern = NULL;
 	  regerror (err, &r, errmsg, 100);
 	  printf ("test %d\n", id);
 	  puts (errmsg);