From 6d482fb6f0178086175723721466ec5262713f4f Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 5 Nov 1996 13:10:32 +0000 Subject: [PATCH] * serialize.c (krb5_register_serializer): Do not free a NULL pointer git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9296 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 4 ++++ src/lib/krb5/krb/serialize.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 27326db51..4d871640c 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 5 08:09:23 1996 Ezra Peisach + + * serialize.c (krb5_register_serializer): Do not free a NULL pointer. + Thu Oct 31 13:48:14 1996 Theodore Y. Ts'o * init_ctx.c (krb5_init_context): Make it more obvious that diff --git a/src/lib/krb5/krb/serialize.c b/src/lib/krb5/krb/serialize.c index 20107c457..392caf4da 100644 --- a/src/lib/krb5/krb/serialize.c +++ b/src/lib/krb5/krb/serialize.c @@ -75,7 +75,7 @@ krb5_register_serializer(kcontext, entry) /* Copy in new entry */ memcpy(&stable[kcontext->ser_ctx_count], entry, sizeof(krb5_ser_entry)); - krb5_xfree(kcontext->ser_ctx); + if (kcontext->ser_ctx) krb5_xfree(kcontext->ser_ctx); kcontext->ser_ctx = (void *) stable; kcontext->ser_ctx_count++; } -- 2.26.2