summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-09-21 17:45:02 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-09-21 17:45:02 -0700
commit2bdc641a5c98b92f8baf3f5f31223dc1b3740701 (patch)
tree35068b470970f0d02da7cbeb4c955441922781ee
parentbf3c9395f0935d804c7339e03cfc10e0316d6e44 (diff)
downloadsyslinux-2bdc641a5c98b92f8baf3f5f31223dc1b3740701.tar.gz
If a later "menu background" overrides an earlier one, free the data
-rw-r--r--com32/modules/readconfig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/com32/modules/readconfig.c b/com32/modules/readconfig.c
index fb9c3d6a..79351902 100644
--- a/com32/modules/readconfig.c
+++ b/com32/modules/readconfig.c
@@ -405,6 +405,8 @@ static void parse_config_file(FILE *f)
}
} else if ( (ep = looking_at(p, "background")) ) {
p = skipspace(ep);
+ if (menu_background)
+ free(menu_background);
menu_background = dup_word(&p);
} else if ((ep = looking_at(p, "color")) ||
(ep = looking_at(p, "colour"))) {