Skip to content

Commit

Permalink
fix C# test access violation exception on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Jun 4, 2015
1 parent 7faeea5 commit c2e5be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/iomgr/resolve_address_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/iomgr/socket_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c2e5be9

Please sign in to comment.