aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Michael Lumish <mlumish@google.com>2015-05-21 09:17:33 -0700
committerGravatar Michael Lumish <mlumish@google.com>2015-05-21 09:17:33 -0700
commit72b0f3a99e82d58778846278cde2770ffdadc278 (patch)
treeb05931d9dd99ec6656c77e0465f30adf1fe6c34f /src
parent19944f5b27ea09f5167a7443f013f51dc4e89197 (diff)
parenta605d334fbb294994940a540942544775e2b3b88 (diff)
Merge pull request #1685 from ctiller/cq-fix
Fix a use after free in completion queue tracing
Diffstat (limited to 'src')
-rw-r--r--src/core/surface/completion_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c
index 48910afda3..8c9ca48a05 100644
--- a/src/core/surface/completion_queue.c
+++ b/src/core/surface/completion_queue.c
@@ -275,14 +275,14 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset));
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_TIMEOUT;
- GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ev->base);
+ GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret);
return ret;
}
}
gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset));
ret = ev->base;
gpr_free(ev);
- GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ev->base);
+ GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret);
return ret;
}