Skip to content

Commit

Permalink
Fix garbage return in extract_cammacs()
Browse files Browse the repository at this point in the history
If no cammacs were present, we would never initialize ret before
returning it.  (extract_cammcs() is currently never called with an
empty or null list, so this does not manifest as a bug.)

[ghudson@mit.edu: amended commit message]
  • Loading branch information
frozencemetery authored and greghudson committed Jun 26, 2018
1 parent 6c8b603 commit 8b3384c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/krb5/krb/authdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static krb5_error_code
extract_cammacs(krb5_context kcontext, krb5_authdata **cammacs,
const krb5_keyblock *key, krb5_authdata ***ad_out)
{
krb5_error_code ret;
krb5_error_code ret = 0;
krb5_authdata **list = NULL, **elements = NULL, **new_list;
size_t i, n_elements, count = 0;

Expand Down

0 comments on commit 8b3384c

Please sign in to comment.