From de67801b0fd3dfa11777c1ef86cd617baf376b7b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 1 Oct 2017 13:38:35 +0100 Subject: Use a proper union in struct config_item. This allows me to use different types for the mutable, dynamically allocated string value in a C_STRING control and the fixed constant list of option names in a C_CHOICES. --- misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc.c') diff --git a/misc.c b/misc.c index b44f1b1..d555ad2 100644 --- a/misc.c +++ b/misc.c @@ -17,7 +17,7 @@ void free_cfg(config_item *cfg) for (i = cfg; i->type != C_END; i++) if (i->type == C_STRING) - sfree(i->sval); + sfree(i->u.string.sval); sfree(cfg); } -- cgit v1.1