]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- In unbound-host use separate variable for get_option to please
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 18 Nov 2019 09:45:47 +0000 (10:45 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 18 Nov 2019 09:45:47 +0000 (10:45 +0100)
  code checkers.

doc/Changelog
smallapp/unbound-host.c

index c4b3781c4b4300b5397adc6d4de0e7aebc1d0ce3..eb51ec447a31ef782b10a88d628ab89ac3d23b9a 100644 (file)
@@ -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.
index c34f012fba1b5e8f089e42723906140b73ac8a9e..1ae2d8521a2da1051a9f4058a76c9a7c4e62ac36 100644 (file)
@@ -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;