aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-06-30 11:31:23 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-06-30 11:31:23 -0700
commit97d1cd87670f6eb082d2243bc7cfd4a21d33a78f (patch)
tree6216a6bec50770c76d50d1027d85814ada0fc8f0 /src/core/lib
parentcdac58bb03e060668b32836bb60a8e629cf39049 (diff)
Fix memory leak, fix error.c refcount reporting
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/error.c8
-rw-r--r--src/core/lib/transport/transport.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c
index e20a0169c5..149c55663c 100644
--- a/src/core/lib/iomgr/error.c
+++ b/src/core/lib/iomgr/error.c
@@ -174,8 +174,8 @@ static bool is_special(grpc_error *err) {
grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line,
const char *func) {
if (is_special(err)) return err;
- gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d %s]", err, err->refs.count,
- err->refs.count + 1, file, line, func);
+ gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err,
+ err->refs.count, err->refs.count + 1, file, line, func);
gpr_ref(&err->refs);
return err;
}
@@ -200,8 +200,8 @@ static void error_destroy(grpc_error *err) {
void grpc_error_unref(grpc_error *err, const char *file, int line,
const char *func) {
if (is_special(err)) return;
- gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d %s]", err, err->refs.count,
- err->refs.count - 1, file, line, func);
+ gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err,
+ err->refs.count, err->refs.count - 1, file, line, func);
if (gpr_unref(&err->refs)) {
error_destroy(err);
}
diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c
index 79a20e1262..f8ddf5774a 100644
--- a/src/core/lib/transport/transport.c
+++ b/src/core/lib/transport/transport.c
@@ -173,7 +173,7 @@ static void free_message(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) {
close_message_data *cmd = p;
GRPC_ERROR_UNREF(cmd->error);
if (cmd->then_call != NULL) {
- cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, GRPC_ERROR_REF(error));
+ cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, error);
}
gpr_free(cmd);
}