(krb5_free_keyblock_contents): don't zero keyvalue if it's NULL.
noticed by Ake Sandgren <ake@cs.umu.se> git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5994 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997 - 1999 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -42,8 +42,9 @@ void
|
|||||||
krb5_free_keyblock_contents(krb5_context context,
|
krb5_free_keyblock_contents(krb5_context context,
|
||||||
krb5_keyblock *keyblock)
|
krb5_keyblock *keyblock)
|
||||||
{
|
{
|
||||||
if(keyblock){
|
if(keyblock) {
|
||||||
memset(keyblock->keyvalue.data, 0, keyblock->keyvalue.length);
|
if (keyblock->keyvalue.data != NULL)
|
||||||
|
memset(keyblock->keyvalue.data, 0, keyblock->keyvalue.length);
|
||||||
krb5_data_free (&keyblock->keyvalue);
|
krb5_data_free (&keyblock->keyvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user