diff --git a/src/resolve/resolvconf-compat.c b/src/resolve/resolvconf-compat.c index d7e6800..0723458 100644 --- a/src/resolve/resolvconf-compat.c +++ b/src/resolve/resolvconf-compat.c @@ -53,6 +53,8 @@ static int parse_nameserver(const char *string) { if (strv_push(&arg_set_dns, word) < 0) return log_oom(); + + word = NULL; } return 0; @@ -202,7 +204,7 @@ int resolvconf_parse_argv(int argc, char *argv[]) { dot = strchr(argv[optind], '.'); if (dot) { - iface = strndupa(argv[optind], dot - argv[optind]); + iface = strndup(argv[optind], dot - argv[optind]); log_debug("Ignoring protocol specifier '%s'.", dot + 1); } else iface = argv[optind]; diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index cf1ec32..355e5c6 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -3090,7 +3090,7 @@ int main(int argc, char **argv) { goto finish; } - if (streq(program_invocation_short_name, "systemd-resolve")) + if (STR_IN_SET(program_invocation_short_name, "systemd-resolve", "resolvconf")) r = compat_main(argc, argv, bus); else r = native_main(argc, argv, bus);