From b539b06d60faf9613781e5b022349326bc3eb627 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Mon, 29 Feb 2016 11:58:45 -0600 Subject: [PATCH] HEIMDAL: krb5_storage_free(NULL) should work BUG: https://bugzilla.samba.org/show_bug.cgi?id=12505 Signed-off-by: Paul Wise Reviewed-by: Jeremy Allison Reviewed-by: Andrew Bartlett Original-author: Nicolas Williams (cherry-picked from heimdal commit b3db07d5f0e03f6a1a0a392e70f9675e19a6d6af) (cherry picked from commit f9ed4f7028a5ed29026ac8ef1b47b63755ba98f8) --- source4/heimdal/lib/krb5/store.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/heimdal/lib/krb5/store.c b/source4/heimdal/lib/krb5/store.c index 17de78e9e74..31afb23c983 100644 --- a/source4/heimdal/lib/krb5/store.c +++ b/source4/heimdal/lib/krb5/store.c @@ -270,6 +270,8 @@ krb5_storage_get_eof_code(krb5_storage *sp) KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_free(krb5_storage *sp) { + if (sp == NULL) + return 0; if(sp->free) (*sp->free)(sp); free(sp->data); -- 2.25.1