From: Greg Hudson Date: Mon, 9 Feb 2009 18:52:40 +0000 (+0000) Subject: Fix possible free of uninitialized value in walk_rtree X-Git-Tag: krb5-1.8-alpha1~680 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cef20c2a8b50867599bd862306d6c4e4d7696ef5;p=krb5.git Fix possible free of uninitialized value in walk_rtree 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 --- diff --git a/src/lib/krb5/krb/walk_rtree.c b/src/lib/krb5/krb/walk_rtree.c index c6e3156a2..5577bb909 100644 --- a/src/lib/krb5/krb/walk_rtree.c +++ b/src/lib/krb5/krb/walk_rtree.c @@ -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;