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 | 39cdf365a38416f2f31429db9656ccfcb65ccd69 (patch) | |
tree | d21a1fbe69af4c7e886667970b64b38e66b44241 | |
parent | 2a0bfa4d66bd75e9f1a0ff8a8fcfdb9c4fffa5be (diff) | |
download | postgresql-39cdf365a38416f2f31429db9656ccfcb65ccd69.tar.gz postgresql-39cdf365a38416f2f31429db9656ccfcb65ccd69.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 6721e58f220..5ad2ed532af 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, "")); |