]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- auth-load-thread, fix buffer free in http processing.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 11 Aug 2026 14:50:00 +0000 (16:50 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 11 Aug 2026 14:50:00 +0000 (16:50 +0200)
services/authload.c

index ae0066c72abb093b02e5be4a6984b17013d719c0..6531e76487051d89d998e3a5f2da64e889af570c 100644 (file)
@@ -422,7 +422,6 @@ auth_load_process_http(struct auth_load_thread* thr)
        if(z->rpz)
                rpz_finish_config(z->rpz);
        if(auth_load_thread_poll_for_quit(thr)) {
-               sldns_buffer_free(scratch_buffer);
                auth_zone_delete_proxy(z);
                return 0;
        }
@@ -430,7 +429,6 @@ auth_load_process_http(struct auth_load_thread* thr)
        auth_load_calc_mem(task, z, scratch_mem);
        auth_load_swap_zone(thr, z);
        auth_zone_delete_proxy(z);
-       sldns_buffer_free(scratch_buffer);
        return 1;
 }
 
@@ -551,8 +549,8 @@ auth_load_process_ixfr(struct auth_load_thread* thr)
                auth_zone_delete_proxy(z);
                return 0;
        }
+       sldns_buffer_free(scratch_buffer);
        if(auth_load_thread_poll_for_quit(thr)) {
-               sldns_buffer_free(scratch_buffer);
                auth_zone_delete_proxy(z);
                return 0;
        }
@@ -560,7 +558,6 @@ auth_load_process_ixfr(struct auth_load_thread* thr)
        auth_load_calc_mem(task, z, scratch_mem);
        auth_load_swap_zone(thr, z);
        auth_zone_delete_proxy(z);
-       sldns_buffer_free(scratch_buffer);
        return 1;
 }
 
@@ -597,8 +594,8 @@ auth_load_process_axfr(struct auth_load_thread* thr)
                auth_zone_delete_proxy(z);
                return 0;
        }
+       sldns_buffer_free(scratch_buffer);
        if(auth_load_thread_poll_for_quit(thr)) {
-               sldns_buffer_free(scratch_buffer);
                auth_zone_delete_proxy(z);
                return 0;
        }
@@ -606,7 +603,6 @@ auth_load_process_axfr(struct auth_load_thread* thr)
        auth_load_calc_mem(task, z, scratch_mem);
        auth_load_swap_zone(thr, z);
        auth_zone_delete_proxy(z);
-       sldns_buffer_free(scratch_buffer);
        return 1;
 }