diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-06-27 02:47:06 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-06-27 02:47:06 +0000 |
commit | b7d9d8b3c76441c4c54d6673fa2f4077473e6a36 (patch) | |
tree | c5ee51c85798373a23dfae534b61a759da090c02 /src/lib/krb5/krb/init_ctx.c | |
parent | 21815828bf2c10b8cdbd5bb9d45d27c4f501d762 (diff) | |
download | krb5-b7d9d8b3c76441c4c54d6673fa2f4077473e6a36.tar.gz krb5-b7d9d8b3c76441c4c54d6673fa2f4077473e6a36.tar.xz krb5-b7d9d8b3c76441c4c54d6673fa2f4077473e6a36.zip |
misc memory leaks
Fix various memory leaks that show up mostly in error cases (e.g.,
failure to allocate one small object, and then we forget to free
another one).
ticket: new
target_version: 1.6.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20481 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/init_ctx.c')
-rw-r--r-- | src/lib/krb5/krb/init_ctx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c index e295570661..3ebbb908dd 100644 --- a/src/lib/krb5/krb/init_ctx.c +++ b/src/lib/krb5/krb/init_ctx.c @@ -359,8 +359,10 @@ get_profile_etype_list(krb5_context context, krb5_enctype **ktypes, char *profst if ((old_ktypes = (krb5_enctype *)malloc(sizeof(krb5_enctype) * (count + 1))) == - (krb5_enctype *) NULL) + (krb5_enctype *) NULL) { + profile_release_string(retval); return ENOMEM; + } sp = retval; j = 0; |