]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
'dctx' must be non NULL, remove test.
authorMark Andrews <marka@isc.org>
Wed, 5 Feb 2020 05:15:35 +0000 (16:15 +1100)
committerMark Andrews <marka@isc.org>
Wed, 5 Feb 2020 07:37:17 +0000 (18:37 +1100)
11030 cleanup:

CID 1452705 (#1 of 1): Dereference before null check
(REVERSE_INULL) check_after_deref: Null-checking dctx
suggests that it may be null, but it has already been
dereferenced on all paths leading to the check.

11031        if (dctx != NULL)
11032                dumpcontext_destroy(dctx);
11033        return (result);

bin/named/server.c

index 0af78773b8e88149d626c184ea78a801687a364c..3acd9ad0e64f153b037e354b80433c442bf9adb5 100644 (file)
@@ -11028,8 +11028,7 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
        return (ISC_R_SUCCESS);
 
  cleanup:
-       if (dctx != NULL)
-               dumpcontext_destroy(dctx);
+       dumpcontext_destroy(dctx);
        return (result);
 }