From: Hans Dedecker Date: Mon, 26 Nov 2018 08:45:47 +0000 (+0100) Subject: config: fix resource leaks on error in config_parse_interface() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fa2403def21b7a5892e74148d931ca767d7f6d4a;p=oweals%2Fnetifd.git config: fix resource leaks on error in config_parse_interface() Signed-off-by: Hans Dedecker --- diff --git a/config.c b/config.c index a1267b0..be10379 100644 --- a/config.c +++ b/config.c @@ -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;