diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clients/kpasswd/ChangeLog | 4 | ||||
-rw-r--r-- | 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 d4cd06c595..a8cd0e8a8a 100644 --- a/src/clients/kpasswd/ChangeLog +++ b/src/clients/kpasswd/ChangeLog @@ -1,3 +1,7 @@ +2001-10-30 Ezra Peisach <epeisach@mit.edu> + + * kpasswd.c (main): Do not free potentially NULL pointers. + 2000-10-17 Ezra Peisach <epeisach@mit.edu> * 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 293d68fbb2..da66102daf 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); |