Code

frontend: Free dynamically allocated memory in the parser.
authorSebastian Harl <sh@tokkee.org>
Mon, 31 Mar 2014 21:34:58 +0000 (23:34 +0200)
committerSebastian Harl <sh@tokkee.org>
Mon, 31 Mar 2014 21:34:58 +0000 (23:34 +0200)
src/frontend/grammar.y

index 004a5effa1537a29473066103757cd169867c37a..4f7a8913630c547b19c5edc86b4d320804ecd2ec 100644 (file)
@@ -154,6 +154,8 @@ fetch_statement:
                                                conn_fetch_t, conn_fetch_destroy));
                        CONN_FETCH($$)->name = strdup($2);
                        $$->cmd = CONNECTION_FETCH;
+                       free($2);
+                       $2 = NULL;
                }
        ;