diff --git a/redsocks.c b/redsocks.c index 78eb1b0..14c91a4 100644 --- a/redsocks.c +++ b/redsocks.c @@ -242,7 +242,7 @@ static int redsocks_onexit(parser_section *section) if (!instance->relay_ss) err = "invalid `type` for redsocks"; } - else { + else if (!err) { err = "no `type` for redsocks"; } diff --git a/redudp.c b/redudp.c index 3ad0f24..bd60c49 100644 --- a/redudp.c +++ b/redudp.c @@ -549,7 +549,7 @@ static int redudp_onexit(parser_section *section) err = "invalid dest address"; } - if (instance->config.type) { + if (!err && instance->config.type) { udprelay_subsys **ss; FOREACH(ss, relay_subsystems) { if (!strcmp((*ss)->name, instance->config.type)) { @@ -561,7 +561,7 @@ static int redudp_onexit(parser_section *section) if (!instance->relay_ss) err = "invalid `type` for redudp"; } - else { + else if (!err) { err = "no `type` for redudp"; }