summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2015-01-04 14:35:46 +0000
committerAndres Freund2015-01-04 14:35:46 +0000
commit58bc4747be26f6849ca38e67e24abdd6aecba3b1 (patch)
tree247dab67b13184e9f38f6f8b2f0e450ee186f3bf
parent0398ece4c5baacc98f0fd46a731518b3ccb25bb3 (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 c8f5f32fbb..b1f8b78d3b 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);