Fix silly bug in kpasswd that caused it to report "out of memory"
authorTheodore Tso <tytso@mit.edu>
Mon, 11 Jan 1993 15:14:43 +0000 (15:14 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 11 Jan 1993 15:14:43 +0000 (15:14 +0000)
every time it is run on some machines.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2480 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/kpasswd/kpasswd.c

index 02d78f0a4f69c060e40be02709c3b47e02c209e7..f6dfd39592c1b1a8cc1b72aefdadb7680313f0c2 100644 (file)
@@ -150,7 +150,7 @@ OLDDECLARG(krb5_pa_data **, padata)
        arg = &arg2;
     }
     my_keyblock = (krb5_keyblock *)malloc(sizeof(**key));
-    if (!*key) {
+    if (!my_keyblock) {
        if (f_salt) xfree(salt.data);
        if (arg != (struct v4_pwd_keyproc_arg *) keyseed) 
                memset((char *) arg->password.data, 0, arg->password.length);