projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35c029f
)
Remove an unneeded conditional in the cleanup for kadmin's keytab
author
Greg Hudson
<ghudson@mit.edu>
Fri, 21 May 2010 19:15:20 +0000
(19:15 +0000)
committer
Greg Hudson
<ghudson@mit.edu>
Fri, 21 May 2010 19:15:20 +0000
(19:15 +0000)
add_principal(), squashing a false-positive memory leak from Coverity.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24083
dc483132
-0cff-0310-8789-
dd5450dbe970
src/kadmin/cli/keytab.c
patch
|
blob
|
history
diff --git
a/src/kadmin/cli/keytab.c
b/src/kadmin/cli/keytab.c
index 8d14f860a620414c870d9894d12f3761acfc6027..a2f8775fb48445efebf3f9aab368533187863d9a 100644
(file)
--- a/
src/kadmin/cli/keytab.c
+++ b/
src/kadmin/cli/keytab.c
@@
-334,11
+334,9
@@
add_principal(void *lhandle, char *keytab_str, krb5_keytab keytab,
}
cleanup:
- if (nkeys) {
- for (i = 0; i < nkeys; i++)
- krb5_free_keyblock_contents(context, &keys[i]);
- free(keys);
- }
+ for (i = 0; i < nkeys; i++)
+ krb5_free_keyblock_contents(context, &keys[i]);
+ free(keys);
krb5_free_principal(context, princ);
}