* kpasswd.c (main): Do not free potentially NULL pointers
authorEzra Peisach <epeisach@mit.edu>
Tue, 30 Oct 2001 13:14:38 +0000 (13:14 +0000)
committerEzra Peisach <epeisach@mit.edu>
Tue, 30 Oct 2001 13:14:38 +0000 (13:14 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13904 dc483132-0cff-0310-8789-dd5450dbe970

src/clients/kpasswd/ChangeLog
src/clients/kpasswd/kpasswd.c

index d4cd06c5952043d534f65a9103bb86c7442f0ac3..a8cd0e8a8a4a1860d791663c55971028d3c8459e 100644 (file)
@@ -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
index 293d68fbb27e570f50ef7cb8d5a9a53553cf11d6..da66102daf7aa6d65f9e21fbff6ed4ba0626e7cb 100644 (file)
@@ -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);