Code

frontend: Free dynamically allocated memory in the parser.
[sysdb.git] / 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;
                }
        ;