From: Ezra Peisach Date: Tue, 30 Oct 2001 13:14:38 +0000 (+0000) Subject: * kpasswd.c (main): Do not free potentially NULL pointers X-Git-Tag: krb5-1.3-alpha1~987 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b199c637ea7f725b71b4081e6c091ca310d61e4f;p=krb5.git * kpasswd.c (main): Do not free potentially NULL pointers git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13904 dc483132-0cff-0310-8789-dd5450dbe970 --- 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);