X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Frpmatch.c;h=ccb45f3376a9108edee53d86c1a868071b876823;hb=a8a1dc286152661e640f0839e3ccd79e0898db6d;hp=cf1252381a4476637e3a10d35066f6a753cef5e9;hpb=9fc81090f6c5590bd1b0e0fa5087577a2ee43a3e;p=gnulib.git diff --git a/lib/rpmatch.c b/lib/rpmatch.c index cf1252381..ccb45f337 100644 --- a/lib/rpmatch.c +++ b/lib/rpmatch.c @@ -110,7 +110,10 @@ try (const char *response, const char *pattern, char **lastp, regex_t *re) return -1; /* Compile the pattern and cache it for future runs. */ if (regcomp (re, safe_pattern, REG_EXTENDED) != 0) - return -1; + { + free (safe_pattern); + return -1; + } *lastp = safe_pattern; }