]> git.ipfire.org Git - thirdparty/bind9.git/commit
Remove redundant 'version == NULL' check
authorMark Andrews <marka@isc.org>
Wed, 3 Feb 2021 05:38:29 +0000 (16:38 +1100)
committerOndřej Surý <ondrej@sury.org>
Wed, 3 Feb 2021 12:06:27 +0000 (13:06 +0100)
commit456d53d1fb2cd32bef2cc5a0906d9c08e215389b
tree5735b04604e41e8d7d7f297c76207b461f3207b6
parentadf5051afca9f2e41687c82aeb72e02fb10246c3
Remove redundant 'version == NULL' check

    *** CID 318094:  Null pointer dereferences  (REVERSE_INULL)
    /lib/dns/rbtdb.c: 1389 in newversion()
    1383      version->xfrsize = rbtdb->current_version->xfrsize;
    1384      RWUNLOCK(&rbtdb->current_version->rwlock, isc_rwlocktype_read);
    1385      rbtdb->next_serial++;
    1386      rbtdb->future_version = version;
    1387      RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
    1388
       CID 318094:  Null pointer dereferences  (REVERSE_INULL)
       Null-checking "version" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    1389      if (version == NULL) {
    1390      return (result);
    1391      }
    1392
    1393      *versionp = version;
    1394
lib/dns/rbtdb.c