]> granicus.if.org Git - postgresql/commitdiff
Fix a potential double-free in ecpg.
authorMichael Meskes <meskes@postgresql.org>
Fri, 10 Mar 2017 09:32:41 +0000 (10:32 +0100)
committerMichael Meskes <meskes@postgresql.org>
Fri, 10 Mar 2017 09:32:41 +0000 (10:32 +0100)
src/interfaces/ecpg/preproc/pgc.l

index 6b58dd5afe71263337fe67bdef316400e437c069..7b2bfdccc9030ae507c9dd63c56209067514355b 100644 (file)
@@ -565,6 +565,7 @@ cppline                     {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
                                {
                                        addlit(yytext, yyleng);
                                        free(dolqstart);
+                                       dolqstart = NULL;
                                        BEGIN(SQL);
                                        base_yylval.str = mm_strdup(literalbuf);
                                        return DOLCONST;