Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/passwd In krb5_end, don't try to free the krb5 conte...



details:   https://anonhg.NetBSD.org/src/rev/e1a1bfbd0292
branches:  trunk
changeset: 499379:e1a1bfbd0292
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sat Nov 18 19:29:20 2000 +0000

description:
In krb5_end, don't try to free the krb5 context if it's not yet
been initialized. Fixes coredump when passwd is called as 'yppasswd'.

diffstat:

 usr.bin/passwd/krb5_passwd.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r c1e5a1e1df18 -r e1a1bfbd0292 usr.bin/passwd/krb5_passwd.c
--- a/usr.bin/passwd/krb5_passwd.c      Sat Nov 18 19:25:35 2000 +0000
+++ b/usr.bin/passwd/krb5_passwd.c      Sat Nov 18 19:29:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: krb5_passwd.c,v 1.9 2000/07/06 11:19:39 ad Exp $ */
+/* $NetBSD: krb5_passwd.c,v 1.10 2000/11/18 19:29:20 fvdl Exp $ */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -87,6 +87,8 @@
 void
 krb5_end(void)
 {
+    if (context == NULL)
+       return;
     if(defprinc)
        krb5_free_principal(context, defprinc);
     krb5_free_context(context);



Home | Main Index | Thread Index | Old Index