X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Frpmatch.c;h=448108203cc5b7f9a51f472c9e81f8936a5458a0;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=f065036b84cc97370ec7dca5a3b5cedd5a232e87;hpb=80a029602f5b2707ca8d2487843ecb9e0df74a6a;p=gnulib.git diff --git a/lib/rpmatch.c b/lib/rpmatch.c index f065036b8..448108203 100644 --- a/lib/rpmatch.c +++ b/lib/rpmatch.c @@ -1,7 +1,7 @@ /* Determine whether string value is affirmation or negative response according to current locale's data. - Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2012 Free Software + Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -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; }