Skip to content

Commit

Permalink
Init output parameter of krb5_decode_princ_entry
Browse files Browse the repository at this point in the history
For easier static analysis, make sure that krb5_decode_princ_entry
always sets *entry_ptr to a valid entry or NULL.
  • Loading branch information
greghudson committed Mar 28, 2013
1 parent eaa16b3 commit b521273
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/kdb/db2/kdb_xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ krb5_decode_princ_entry(krb5_context context, krb5_data *content,
krb5_db_entry * entry;
krb5_error_code retval;

*entry_ptr = NULL;

entry = k5alloc(sizeof(*entry), &retval);
if (entry == NULL)
return retval;
Expand Down

0 comments on commit b521273

Please sign in to comment.