diff options
author | 2017-11-16 14:28:30 -0800 | |
---|---|---|
committer | 2017-11-16 14:28:30 -0800 | |
commit | 588d6d9294fb328d22d2edbd39693408cf6b2eff (patch) | |
tree | 45e0a05d6973ff2e0e15914e476097f06cf3a784 /src/core/lib/iomgr | |
parent | 311fa5f8188c4a1116a38991a377030708833336 (diff) |
unref before write failures for completness
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r-- | src/core/lib/iomgr/tcp_posix.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 3523c68973..026c1c0942 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -589,9 +589,13 @@ static bool tcp_flush(grpc_exec_ctx* exec_ctx, grpc_tcp* tcp, *error = grpc_error_set_int(GRPC_OS_ERROR(errno, "sendmsg"), GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE); + grpc_slice_buffer_reset_and_unref_internal(exec_ctx, + tcp->outgoing_buffer); return true; } else { *error = tcp_annotate_error(GRPC_OS_ERROR(errno, "sendmsg"), tcp); + grpc_slice_buffer_reset_and_unref_internal(exec_ctx, + tcp->outgoing_buffer); return true; } } |