X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Frpmatch.c;h=0eddb55e7543fda0f91c1629de2a11aa13f6b70a;hb=daa269958ad8d50ef8154ccb65e58acaf7a6dd99;hp=d002a03e51f0120ba047b93825891dd508562f1c;hpb=22f1eb8bc17e5be72dd23d42d6aaa60196ac22e6;p=debian%2Ftar diff --git a/gnu/rpmatch.c b/gnu/rpmatch.c index d002a03e..0eddb55e 100644 --- a/gnu/rpmatch.c +++ b/gnu/rpmatch.c @@ -3,7 +3,7 @@ /* Determine whether string value is affirmation or negative response according to current locale's data. - Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2010 Free Software + Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -112,7 +112,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; }