git.samba.org
/
lorikeet-heimdal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86017e8
)
Fix memleak in kswitch rare error
author
Nicolas Williams
<nico@cryptonector.com>
Fri, 20 Mar 2015 03:10:51 +0000
(22:10 -0500)
committer
Nicolas Williams
<nico@cryptonector.com>
Tue, 24 Mar 2015 16:50:03 +0000
(11:50 -0500)
kuser/kswitch.c
patch
|
blob
|
history
diff --git
a/kuser/kswitch.c
b/kuser/kswitch.c
index 98170f4898babd5485433bf3c5b0b58848bbcef5..c7fe312ff60888a7fed8adf2b4ade5cfd38d4c7a 100644
(file)
--- a/
kuser/kswitch.c
+++ b/
kuser/kswitch.c
@@
-90,8
+90,10
@@
kswitch(struct kswitch_options *opt, int argc, char **argv)
char num[10];
ret = krb5_cc_get_principal(heimtools_context, id, &p);
- if (ret)
+ if (ret) {
+ krb5_cc_close(heimtools_context, id);
continue;
+ }
ret = krb5_unparse_name(heimtools_context, p, &name);
krb5_free_principal(heimtools_context, p);