diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-05-21 19:15:20 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-05-21 19:15:20 +0000 |
commit | a21915bebf12cddc2fd4819bcc6efedfebdc85a9 (patch) | |
tree | 1840608c5e7cc01b3540f55dd5108230131cd026 /src | |
parent | 35c029fe558cace4e048d1dd4d434750a7599fe8 (diff) | |
download | krb5-a21915bebf12cddc2fd4819bcc6efedfebdc85a9.zip krb5-a21915bebf12cddc2fd4819bcc6efedfebdc85a9.tar.gz krb5-a21915bebf12cddc2fd4819bcc6efedfebdc85a9.tar.bz2 |
Remove an unneeded conditional in the cleanup for kadmin's keytab
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
Diffstat (limited to 'src')
-rw-r--r-- | src/kadmin/cli/keytab.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/kadmin/cli/keytab.c b/src/kadmin/cli/keytab.c index 8d14f86..a2f8775 100644 --- 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); } |