Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sources/auth_query.c: improve cleanup on error path #580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sources/auth_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ int od_auth_query(od_client_t *client, char *peer)
od_debug(&instance->logger, "auth_query", auth_client, NULL,
"failed to route internal auth query client: %s",
od_router_status_to_str(status));
od_router_close(router, auth_client);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If client is not routed we cannot close it, no backend connection is assigned
we also cannot unroute non-routed client

od_router_unroute(router, auth_client);
od_client_free(auth_client);
goto error;
}
Expand Down
Loading