From: Andres Freund Date: Sun, 4 Jan 2015 14:35:48 +0000 (+0100) Subject: Add missing va_end() call to a early exit in dmetaphone.c's StringAt(). X-Git-Tag: REL9_0_19~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17797e18dd449a354fd506f170526219cd4b7986;p=thirdparty%2Fpostgresql.git 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 f23a3a2aa6d..b128c2d9036 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, ""));