Skip to content

Commit

Permalink
Revert "prevent memory corruption in dbengine" (netdata#19364)
Browse files Browse the repository at this point in the history
Revert "prevent memory corruption in dbengine (netdata#19363)"

This reverts commit 50fb61d.
  • Loading branch information
ktsaou authored Jan 10, 2025
1 parent 50fb61d commit d447f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/database/engine/rrdengineapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,8 @@ void rrdeng_load_metric_finalize(struct storage_engine_query_handle *seqh)
pgdc_reset(&handle->pgdc, NULL, UINT32_MAX);
}

__atomic_store_n(&handle->pdc->workers_should_stop, true, __ATOMIC_RELAXED);
pdc_release_and_destroy_if_unreferenced(handle->pdc, false, false);
if(!pdc_release_and_destroy_if_unreferenced(handle->pdc, false, false))
__atomic_store_n(&handle->pdc->workers_should_stop, true, __ATOMIC_RELAXED);

unregister_query_handle(handle);
rrdeng_query_handle_release(handle);
Expand Down

0 comments on commit d447f55

Please sign in to comment.