krb5_storage_free(NULL) should work

This commit is contained in:
Nicolas Williams
2016-02-29 11:58:45 -06:00
parent 9f0e64d5b8
commit b3db07d5f0

View File

@@ -289,6 +289,8 @@ krb5_storage_get_eof_code(krb5_storage *sp)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_storage_free(krb5_storage *sp) krb5_storage_free(krb5_storage *sp)
{ {
if (sp == NULL)
return 0;
if(sp->free) if(sp->free)
(*sp->free)(sp); (*sp->free)(sp);
free(sp->data); free(sp->data);