diff options
author | Andres Freund <andres@anarazel.de> | 2015-01-04 15:35:47 +0100 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-01-04 15:35:47 +0100 |
commit | d33f36f16e6a80b81afe55401917f8d23e924f83 (patch) | |
tree | d3a0d03c60c228a975960d50bd427dacc553d517 | |
parent | ec14f16014ecc04f41d9c285cb97922550097653 (diff) | |
download | postgresql-d33f36f16e6a80b81afe55401917f8d23e924f83.tar.gz postgresql-d33f36f16e6a80b81afe55401917f8d23e924f83.zip |
Add missing va_end() call to a early exit in dmetaphone.c's StringAt().
Pointed out by Coverity.
Backpatch to all supported branches, the code has been that way for a
long while.
-rw-r--r-- | contrib/fuzzystrmatch/dmetaphone.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c index f562f5484cc..a415bbb292f 100644 --- a/contrib/fuzzystrmatch/dmetaphone.c +++ b/contrib/fuzzystrmatch/dmetaphone.c @@ -362,7 +362,10 @@ StringAt(metastring *s, int start, int length,...) { test = va_arg(ap, char *); if (*test && (strncmp(pos, test, length) == 0)) + { + va_end(ap); return 1; + } } while (strcmp(test, "") != 0); |