postgres.git / summary / log / commit / refs

commit    029e41afd2930bfabbbc6a1b7d3bf7b21455f150
Author:   Andres Freund <andres@anarazel.de>
Date:     Sun Jan 04 14:35:47 2015 +0000

    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.


contrib/fuzzystrmatch/dmetaphone.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c index f562f5484cc..a415bbb292f 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, "") != 0); [parent: f4060db11852]