/*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: password.c,v 1.26 1999/10/23 03:13:21 tgl Exp $
+ * $Id: password.c,v 1.27 1999/11/23 01:04:38 tgl Exp $
*
*/
return STATUS_ERROR;
}
+ pfree(pw_file_fullname);
+
while (!feof(pw_file))
{
char pw_file_line[255],
if (strcmp(user, test_user) == 0)
{
- /* we're outta here one way or the other. */
+ /* we're outta here one way or the other, so close file */
FreeFile(pw_file);
if (strcmp(crypt(password, test_pw), test_pw) == 0)
{
/* it matched. */
-
- pfree(pw_file_fullname);
-
return STATUS_OK;
}
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
- pfree(pw_file_fullname);
-
return STATUS_ERROR;
}
}
+ FreeFile(pw_file);
+
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
"verify_password: user '%s' not found in password file.\n",
user);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
- pfree(pw_file_fullname);
-
return STATUS_ERROR;
}