From 67092727e5070297247905c6a97d9f745b174e8d Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 13 Mar 2009 16:36:20 -0700 Subject: [PATCH] Fix cfg_del_section() function that was recently broken. This was showing up when the bridge compatibiity module was attempting to delete a bridge. --- lib/cfg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cfg.c b/lib/cfg.c index 67f8152a..0bb50b42 100644 --- a/lib/cfg.c +++ b/lib/cfg.c @@ -516,10 +516,10 @@ cfg_del_section(const char *section_, ...) ds_put_char(§ion, '.'); va_end(args); - for (p = find_key_le(ds_cstr(§ion)); - *p && !strncmp(section.string, *p, section.length); - p++) { - svec_del(&cfg, *p); + for (p = cfg.names; *p; p++) { /* XXX this is inefficient */ + if (!strncmp(section.string, *p, section.length)) { + svec_del(&cfg, *p); + } } ds_destroy(§ion); dirty = true; -- 2.30.2