diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-11-26 09:45:47 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-11-26 09:52:59 +0100 |
commit | fa2403def21b7a5892e74148d931ca767d7f6d4a (patch) | |
tree | c02461e82f63bfede2743920703ce29e45723f1e | |
parent | 85de9def885fee6335a526bc2b3b733e1f6b7014 (diff) |
config: fix resource leaks on error in config_parse_interface()
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | config.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -120,7 +120,8 @@ config_parse_interface(struct uci_section *s, bool alias) if (!interface_add_alias(iface, config)) goto error_free_config; } else { - interface_add(iface, config); + if (!interface_add(iface, config)) + goto error_free_config; } return; |