From: Andres Freund Date: Sun, 4 Jan 2015 14:35:46 +0000 (+0100) Subject: Add missing va_end() call to a early exit in dmetaphone.c's StringAt(). X-Git-Tag: REL9_4_1~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d8411a0a08d2c24607dc179cb35385e623327c7;p=postgresql 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. --- diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c index 5001288bb6..dcbc7782d4 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);