]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure diff variable is not read uninitialized
authorPetr Menšík <pemensik@redhat.com>
Wed, 19 Jan 2022 12:35:32 +0000 (13:35 +0100)
committerMark Andrews <marka@isc.org>
Fri, 29 Apr 2022 01:22:40 +0000 (11:22 +1000)
Coverity detected issues:
- var_decl: Declaring variable "diff" without initializer.
- uninit_use_in_call: Using uninitialized value "diff.tuples.head" when
  calling "dns_diff_clear".

lib/dns/zone.c

index ed3d3eda2bd44f42d61ac31503069bb27a0f86fb..794154d8b5364ff2243d4563b192f4389d927721 100644 (file)
@@ -23450,7 +23450,7 @@ setserial(isc_task_t *task, isc_event_t *event) {
        ENTER;
 
        if (zone->update_disabled) {
-               goto failure;
+               goto disabled;
        }
 
        desired = sse->serial;
@@ -23529,6 +23529,8 @@ failure:
                dns_db_detach(&db);
        }
        dns_diff_clear(&diff);
+
+disabled:
        isc_event_free(&event);
        dns_zone_idetach(&zone);