Skip to content

Commit

Permalink
Fix possible free of uninitialized value in walk_rtree
Browse files Browse the repository at this point in the history
In rtree_hier_realms, if the first rtree_hier_tweens call failed, the
cleanup handler would free stweens which had not been initialized.
Initialize ctweens and stweens to NULL in the variable declarations to
make the cleanup handler safe.

ticket: 6379
tags: pullup
target_version: 1.7

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21924 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
greghudson committed Feb 9, 2009
1 parent 55b0a87 commit cef20c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/krb5/krb/walk_rtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ rtree_hier_realms(
{
krb5_error_code retval;
struct hstate c, s;
krb5_data *ctweens, *stweens, *twp, *r, *rp;
krb5_data *ctweens = NULL, *stweens = NULL, *twp, *r, *rp;
size_t nctween, nstween;

*realms = NULL;
Expand Down

0 comments on commit cef20c2

Please sign in to comment.