plug some parse.y leaks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/gotweb/parse.y b/gotweb/parse.y
index e137202..93dc3d7 100644
--- a/gotweb/parse.y
+++ b/gotweb/parse.y
@@ -135,6 +135,7 @@ main : GOT_REPOS_PATH STRING {
yyerror("strdup");
YYERROR;
}
+ free($2);
}
| GOT_MAX_REPOS NUMBER {
if ($2 > 0)
@@ -147,6 +148,7 @@ main : GOT_REPOS_PATH STRING {
yyerror("strdup");
YYERROR;
}
+ free($2);
}
| GOT_SITE_OWNER STRING {
gw_conf->got_site_owner = strdup($2);
@@ -155,6 +157,7 @@ main : GOT_REPOS_PATH STRING {
yyerror("strdup");
YYERROR;
}
+ free($2);
}
| GOT_SITE_LINK STRING {
gw_conf->got_site_link = strdup($2);
@@ -163,6 +166,7 @@ main : GOT_REPOS_PATH STRING {
yyerror("strdup");
YYERROR;
}
+ free($2);
}
| GOT_LOGO STRING {
gw_conf->got_logo = strdup($2);
@@ -171,6 +175,7 @@ main : GOT_REPOS_PATH STRING {
yyerror("strdup");
YYERROR;
}
+ free($2);
}
| GOT_LOGO_URL STRING {
gw_conf->got_logo_url = strdup($2);
@@ -179,6 +184,7 @@ main : GOT_REPOS_PATH STRING {
yyerror("strdup");
YYERROR;
}
+ free($2);
}
| GOT_SHOW_SITE_OWNER boolean {
gw_conf->got_show_site_owner = $2;