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

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