summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-01-04 15:35:46 +0100
committerAndres Freund <andres@anarazel.de>2015-01-04 15:35:46 +0100
commit2d8411a0a08d2c24607dc179cb35385e623327c7 (patch)
treed0fc4a1e5ba899bba19313224b7c6bdf423fb243
parentff7d46b8572ce566230c53e3c937412b3d19d8cf (diff)
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c
index 5001288bb64..dcbc7782d45 100644
--- a/contrib/fuzzystrmatch/dmetaphone.c
+++ b/contrib/fuzzystrmatch/dmetaphone.c
@@ -359,7 +359,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);