diff options
author | Tom Yu <tlyu@mit.edu> | 2009-07-09 18:12:32 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2009-07-09 18:12:32 +0000 |
commit | 917a04fe4e3fe8cd509ff31f6e8cf356fe280b99 (patch) | |
tree | ee9b3633a10a721ffa4bb7018af90c2525ae654c | |
parent | 86af898ba394ff6fe210aa7dff66135a610468f3 (diff) | |
download | krb5-917a04fe4e3fe8cd509ff31f6e8cf356fe280b99.zip krb5-917a04fe4e3fe8cd509ff31f6e8cf356fe280b99.tar.gz krb5-917a04fe4e3fe8cd509ff31f6e8cf356fe280b99.tar.bz2 |
pull up r20608 from trunk
------------------------------------------------------------------------
r20608 | raeburn | 2008-08-05 20:05:47 -0400 (Tue, 05 Aug 2008) | 9 lines
ticket: new
subject: fix cleanup code in allocating preauth info
target_version: 1.6.4
tags: pullup
After an allocation failure, free up the previously allocated array
elements by counting back down to zero, not continuing to count up
until we hit zero.
ticket: 6064
version_fixed: 1.6.4
status: resolved
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@22429 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb5/krb/get_in_tkt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index d54d893..5f15d5b 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -1,7 +1,7 @@ /* * lib/krb5/krb/get_in_tkt.c * - * Copyright 1990,1991, 2003 by the Massachusetts Institute of Technology. + * Copyright 1990,1991, 2003, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -409,7 +409,7 @@ make_preauth_list(krb5_context context, for (i=0; i<nptypes; i++) { if ((preauthp[i] = (krb5_pa_data *) malloc(sizeof(krb5_pa_data))) == NULL) { - for (; i>=0; i++) + for (; i>=0; i--) free(preauthp[i]); free(preauthp); return (ENOMEM); |