aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/profiling/basic_timers.c
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-03-26 01:33:34 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-03-26 01:33:34 +0100
commit7c9a154803c0293a8c0b51bbec65dc00a950989e (patch)
tree86c1ae0a49af8c8e828644f0fb36c701531e276d /src/core/profiling/basic_timers.c
parentf3d76384351039266e250aacf97c90d5b0c07dca (diff)
Sanitize mallocs and frees.
Diffstat (limited to 'src/core/profiling/basic_timers.c')
-rw-r--r--src/core/profiling/basic_timers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/profiling/basic_timers.c b/src/core/profiling/basic_timers.c
index 3067f52c21..3c9557ab89 100644
--- a/src/core/profiling/basic_timers.c
+++ b/src/core/profiling/basic_timers.c
@@ -173,7 +173,7 @@ static void flush_logs(gpr_timer_log_list *list) {
gpr_timer_log *log;
while ((log = timer_log_pop_front(list)) != NULL) {
write_log(log);
- free(log);
+ gpr_free(log);
}
}
@@ -208,7 +208,7 @@ static void init_output() {
}
static void rotate_log() {
- gpr_timer_log *new = malloc(sizeof(*new));
+ gpr_timer_log *new = gpr_malloc(sizeof(*new));
gpr_once_init(&g_once_init, init_output);
new->num_entries = 0;
pthread_mutex_lock(&g_mu);