From 2b5691502948f6535db7af606a0eefb7f0acdf7d Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:50:58 +0100 Subject: [PATCH] added decref --- src/sentry_scope.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sentry_scope.c b/src/sentry_scope.c index 96204d0cc..7a2f20a3c 100644 --- a/src/sentry_scope.c +++ b/src/sentry_scope.c @@ -338,8 +338,10 @@ sentry__scope_apply_to_event(const sentry_scope_t *scope, sentry_value_decref(contexts); if (mode & SENTRY_SCOPE_BREADCRUMBS) { - PLACE_VALUE("breadcrumbs", - sentry__value_ring_buffer_to_list(scope->breadcrumbs)); + sentry_value_t l + = sentry__value_ring_buffer_to_list(scope->breadcrumbs); + PLACE_VALUE("breadcrumbs", l); + sentry_value_decref(l); } if (mode & SENTRY_SCOPE_MODULES) {