Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/system/Darwin')
-rw-r--r--agent/system/Darwin/tcf/context-darwin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/system/Darwin/tcf/context-darwin.c b/agent/system/Darwin/tcf/context-darwin.c
index 55fcf739..2b6cb508 100644
--- a/agent/system/Darwin/tcf/context-darwin.c
+++ b/agent/system/Darwin/tcf/context-darwin.c
@@ -505,6 +505,7 @@ static void event_pid_exited(pid_t pid, int status, int signal) {
}
else {
assert(ctx->ref_count == 0);
+ ctx->ref_count = 1;
if (EXT(ctx)->attach_callback != NULL) {
if (status == 0) status = EINVAL;
EXT(ctx)->attach_callback(status, ctx, EXT(ctx)->attach_data);
@@ -512,7 +513,6 @@ static void event_pid_exited(pid_t pid, int status, int signal) {
assert(list_is_empty(&ctx->children));
assert(ctx->parent == NULL);
ctx->exited = 1;
- ctx->ref_count = 1;
context_unlock(ctx);
}
}

Back to the top