diff options
Diffstat (limited to 'Src/Modules/zutil.c')
-rw-r--r-- | Src/Modules/zutil.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c index 85ab4b394..cb099bbcc 100644 --- a/Src/Modules/zutil.c +++ b/Src/Modules/zutil.c @@ -119,7 +119,10 @@ setstypat(Style s, char *pat, Patprog prog, char **vals, int eval) errflag = ef; if (!eprog) + { + freepatprog(prog); return 1; + } eprog = dupeprog(eprog, 0); } @@ -134,6 +137,7 @@ setstypat(Style s, char *pat, Patprog prog, char **vals, int eval) freeeprog(p->eval); p->vals = zarrdup(vals); p->eval = eprog; + freepatprog(prog); return 0; } |