Commit 58bc4747 authored by Andres Freund's avatar Andres Freund

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.
parent 0398ece4
...@@ -359,7 +359,10 @@ StringAt(metastring *s, int start, int length,...) ...@@ -359,7 +359,10 @@ StringAt(metastring *s, int start, int length,...)
{ {
test = va_arg(ap, char *); test = va_arg(ap, char *);
if (*test && (strncmp(pos, test, length) == 0)) if (*test && (strncmp(pos, test, length) == 0))
{
va_end(ap);
return 1; return 1;
}
} }
while (strcmp(test, "") != 0); while (strcmp(test, "") != 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment