From b199c637ea7f725b71b4081e6c091ca310d61e4f Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 30 Oct 2001 13:14:38 +0000 Subject: [PATCH] * kpasswd.c (main): Do not free potentially NULL pointers git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13904 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/kpasswd/ChangeLog | 4 ++++ src/clients/kpasswd/kpasswd.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/clients/kpasswd/ChangeLog b/src/clients/kpasswd/ChangeLog index d4cd06c59..a8cd0e8a8 100644 --- a/src/clients/kpasswd/ChangeLog +++ b/src/clients/kpasswd/ChangeLog @@ -1,3 +1,7 @@ +2001-10-30 Ezra Peisach + + * kpasswd.c (main): Do not free potentially NULL pointers. + 2000-10-17 Ezra Peisach * kpasswd.c (main): Argument to krb5_read_password takes an diff --git a/src/clients/kpasswd/kpasswd.c b/src/clients/kpasswd/kpasswd.c index 293d68fbb..da66102da 100644 --- a/src/clients/kpasswd/kpasswd.c +++ b/src/clients/kpasswd/kpasswd.c @@ -139,8 +139,10 @@ int main(int argc, char *argv[]) exit(2); } - free(result_string.data); - free(result_code_string.data); + if (result_string.data != NULL) + free(result_string.data); + if (result_code_string.data != NULL) + free(result_code_string.data); printf("Password changed.\n"); exit(0); -- 2.26.2