Fix another latent bug in Regexp::Walker<T>::Reset().

Change-Id: I41ade89efd93fed2a704d718659476eeb9fe6f83
Reviewed-on: https://code-review.googlesource.com/c/re2/+/59390
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/walker-inl.h b/re2/walker-inl.h
index 1d38c0a..4d064a0 100644
--- a/re2/walker-inl.h
+++ b/re2/walker-inl.h
@@ -148,7 +148,8 @@
   if (!stack_.empty()) {
     LOG(DFATAL) << "Stack not empty.";
     while (!stack_.empty()) {
-      delete[] stack_.top().child_args;
+      if (stack_.top().re->nsub_ > 1)
+        delete[] stack_.top().child_args;
       stack_.pop();
     }
   }