]> 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:50:46 +0000 (10:50 +0100)
src/interfaces/ecpg/preproc/pgc.l

index 283343d822844d6d47ceaa5ac29555bccf5e1775..3601544da20d29c04cedcfe02f6b6198353b917a 100644 (file)
@@ -566,6 +566,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;