Remove pfrees of cached pg_pwd file, per Tom Lane.
authorBruce Momjian <[email protected]>
Sat, 15 Jun 2002 00:52:23 +0000 (00:52 +0000)
committerBruce Momjian <[email protected]>
Sat, 15 Jun 2002 00:52:23 +0000 (00:52 +0000)
src/backend/libpq/crypt.c

index 304f557c319cf3f2de86136d96f93e977b920161..4056539c4a054bf62155c042f31dc65729fae138 100644 (file)
@@ -9,7 +9,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.46 2002/04/25 00:56:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.47 2002/06/15 00:52:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -52,13 +52,7 @@ md5_crypt_verify(const Port *port, const char *user, const char *pgpass)
    }
    
    if (passwd == NULL || *passwd == '\0')
-   {
-       if (passwd)
-           pfree(passwd);
-       if (valuntil)
-           pfree(valuntil);
        return STATUS_ERROR;
-   }
 
    /* If they encrypt their password, force MD5 */
    if (isMD5(passwd) && port->auth_method != uaMD5)
@@ -140,9 +134,6 @@ md5_crypt_verify(const Port *port, const char *user, const char *pgpass)
            retval = STATUS_OK;
    }
 
-   pfree(passwd);
-   if (valuntil)
-       pfree(valuntil);
    if (port->auth_method == uaMD5)
        pfree(crypt_pwd);