diff options
author | Omar Polo <op@omarpolo.com> | 2022-09-10 09:40:05 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-09-10 09:40:05 +0000 |
commit | aa9543b9fd1963d86f63fda13addb356f9039c37 (patch) | |
tree | e01438402f1c2dfd9aa5d34a54701681fcf62c68 /parse.y | |
parent | 7277bb7dc2971fad2a51b7975df85dda1df4c936 (diff) |
make the mime types fixed-sized too
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -225,6 +225,8 @@ option : CHROOT string { "`types' block."); if (add_mime(&conf.mime, $2, $3) == -1) err(1, "add_mime"); + free($2); + free($3); } | MAP string TOEXT string { yywarn("`map mime to-ext' is deprecated and will be " @@ -232,6 +234,8 @@ option : CHROOT string { "`types' block."); if (add_mime(&conf.mime, $2, $4) == -1) err(1, "add_mime"); + free($2); + free($4); } | PORT NUM { conf.port = check_port_num($2); } | PREFORK NUM { conf.prefork = check_prefork_num($2); } @@ -477,7 +481,10 @@ mediaopts_l : mediaopts_l mediaoptsl nl | mediaoptsl nl ; -mediaoptsl : STRING { current_media = $1; } medianames_l optsemicolon +mediaoptsl : STRING { + free(current_media); + current_media = $1; + } medianames_l optsemicolon | include ; @@ -488,6 +495,7 @@ medianames_l : medianames_l medianamesl medianamesl : numberstring { if (add_mime(&conf.mime, current_media, $1) == -1) err(1, "add_mime"); + free($1); } ; |