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

Possible memory leak in get_cred_kdc #1207

Open
riastradh opened this issue Jan 2, 2024 · 0 comments
Open

Possible memory leak in get_cred_kdc #1207

riastradh opened this issue Jan 2, 2024 · 0 comments

Comments

@riastradh
Copy link

Describe the bug
get_cred_kdc allocates various temporaries to be freed by the out label at the end, but there's an error branch that bypasses goto out and returns directly:

heimdal/lib/krb5/get_cred.c

Lines 646 to 648 in 3253c49

ret = krb5_sendto_ctx_alloc(context, &stctx);
if (ret)
return ret;

This should probably use goto out instead of return ret.

To Reproduce
code inspection

Expected behavior
no memory leaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant