aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-06-04 20:46:26 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-06-04 20:46:26 -0700
commit8a7592acc31156b3257979fdb52f3d554a0bf0c5 (patch)
tree7c1180d526399a77910fe390efdf00b45fa607ed /src/core/iomgr
parent7b6e979f46174ffe1893bea868b3cd9f18c25639 (diff)
parentb15d37a3c8382d156bae89466d2cef32d668253e (diff)
Merge remote-tracking branch 'upstream/master' into you-complete-me
Diffstat (limited to 'src/core/iomgr')
-rw-r--r--src/core/iomgr/resolve_address_windows.c2
-rw-r--r--src/core/iomgr/socket_windows.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/iomgr/resolve_address_windows.c b/src/core/iomgr/resolve_address_windows.c
index d388b04837..fb5fd0d4f6 100644
--- a/src/core/iomgr/resolve_address_windows.c
+++ b/src/core/iomgr/resolve_address_windows.c
@@ -135,9 +135,9 @@ static void do_request(void *rp) {
grpc_resolve_cb cb = r->cb;
gpr_free(r->name);
gpr_free(r->default_port);
+ grpc_iomgr_unregister_object(&r->iomgr_object);
gpr_free(r);
cb(arg, resolved);
- grpc_iomgr_unregister_object(&r->iomgr_object);
}
void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) {
diff --git a/src/core/iomgr/socket_windows.c b/src/core/iomgr/socket_windows.c
index e4ba0a2b66..fbf3fdc949 100644
--- a/src/core/iomgr/socket_windows.c
+++ b/src/core/iomgr/socket_windows.c
@@ -85,13 +85,13 @@ int grpc_winsocket_shutdown(grpc_winsocket *socket) {
both memory and sockets. */
void grpc_winsocket_orphan(grpc_winsocket *winsocket) {
SOCKET socket = winsocket->socket;
+ grpc_iomgr_unregister_object(&winsocket->iomgr_object);
if (winsocket->read_info.outstanding || winsocket->write_info.outstanding) {
grpc_iocp_socket_orphan(winsocket);
} else {
grpc_winsocket_destroy(winsocket);
}
closesocket(socket);
- grpc_iomgr_unregister_object(&winsocket->iomgr_object);
}
void grpc_winsocket_destroy(grpc_winsocket *winsocket) {