aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pw.c b/pw.c
index 8bb2184..f6c79fc 100644
--- a/pw.c
+++ b/pw.c
@@ -462,6 +462,8 @@ static void execute(char *cmd, unsigned *pstat)
break;
}
+ memset(gr, 0, sizeof *gr);
+
if ((err = regcomp(&gr->rx, arg, REG_EXTENDED | REG_NOSUB)) != 0) {
regerror(err, &gr->rx, cmd, cmdsize);
break;