diff --git a/usr.sbin/uhsoctl/uhsoctl.c b/usr.sbin/uhsoctl/uhsoctl.c index 686d45ffd17..9dc13ab3df8 100644 --- a/usr.sbin/uhsoctl/uhsoctl.c +++ b/usr.sbin/uhsoctl/uhsoctl.c @@ -452,6 +452,7 @@ set_nameservers(struct ctx *ctx, const char *respath, int ns, ...) free(ctx->ns[i]); } free(ctx->ns); + ctx->ns = NULL; } fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW, 0666);