From: W.C.A. Wijngaards Date: Mon, 18 Nov 2019 09:45:47 +0000 (+0100) Subject: - In unbound-host use separate variable for get_option to please X-Git-Tag: release-1.9.6rc1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57f258279018ed0ca0898a8b500432b5fc77618f;p=thirdparty%2Funbound.git - In unbound-host use separate variable for get_option to please code checkers. --- diff --git a/doc/Changelog b/doc/Changelog index c4b3781c4..eb51ec447 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +18 November 2019: Wouter + - In unbound-host use separate variable for get_option to please + code checkers. + 13 November 2019: Wouter - iana portlist updated. - contrib/fastrpz.patch updated to apply for current code. diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index c34f012fb..1ae2d8521 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -426,6 +426,7 @@ int main(int argc, char* argv[]) int c; char* qclass = NULL; char* qtype = NULL; + char* use_syslog = NULL; struct ub_ctx* ctx = NULL; int debuglevel = 0; @@ -486,11 +487,11 @@ int main(int argc, char* argv[]) } if(debuglevel != 0) /* set after possible -C options */ check_ub_res(ub_ctx_debuglevel(ctx, debuglevel)); - if(ub_ctx_get_option(ctx, "use-syslog", &optarg) == 0) { - if(strcmp(optarg, "yes") == 0) /* disable use-syslog */ + if(ub_ctx_get_option(ctx, "use-syslog", &use_syslog) == 0) { + if(strcmp(use_syslog, "yes") == 0) /* disable use-syslog */ check_ub_res(ub_ctx_set_option(ctx, "use-syslog:", "no")); - free(optarg); + free(use_syslog); } argc -= optind; argv += optind;