projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0703a1a
)
When returning an error, don't also pass back an invalid pointer
author
Ken Raeburn
<raeburn@mit.edu>
Fri, 27 Jun 2008 03:20:48 +0000
(
03:20
+0000)
committer
Ken Raeburn
<raeburn@mit.edu>
Fri, 27 Jun 2008 03:20:48 +0000
(
03:20
+0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20484
dc483132
-0cff-0310-8789-
dd5450dbe970
src/lib/crypto/old_api_glue.c
patch
|
blob
|
history
diff --git
a/src/lib/crypto/old_api_glue.c
b/src/lib/crypto/old_api_glue.c
index fda16909a3a7ebc90c299280b0881f4533288640..4db0c3359477ec61d84ed0e58f382e7ebb7cd6d1 100644
(file)
--- a/
src/lib/crypto/old_api_glue.c
+++ b/
src/lib/crypto/old_api_glue.c
@@
-147,8
+147,10
@@
krb5_random_key(krb5_context context, const krb5_encrypt_block *eblock,
if ((key = (krb5_keyblock *) malloc(sizeof(krb5_keyblock))) == NULL)
return(ENOMEM);
- if ((ret = krb5_c_make_random_key(context, eblock->crypto_entry, key)))
+ if ((ret = krb5_c_make_random_key(context, eblock->crypto_entry, key)))
{
free(key);
+ key = NULL;
+ }
*keyblock = key;