Skip to content

Resolve: CID 352848, CID 352849: Control flow issues (DEADCODE)

To address CID 352848 within xfrin.c, this merge request separates TLS context creation code from xfrin_start() as it has become too large and hard to follow into a new function (similarly how it is done in dighost.c)

The dead code has been removed from the cleanup section of the TLS creation code:

  • there is no way tlsctx can equal found;
  • there is no way sess_cache can be non-NULL in the cleanup section.

Also, it fixes a bug in the older version of the code, where TLS client session context fetched from the cache would not get passed to isc_nm_tlsdnsconnect().

To address CID 352849 within dighost.c, this merge request removes dead code from cleanup handling part of the get_create_tls_context().

In particular, currently:

  • there is no way found_ctx might equal ctx;
  • there is no way session_cache might equal a non-NULL value while cleaning up after a TLS initialisation error.

Closes #3375 (closed)

Edited by Artem Boldariev

Merge request reports