modified pool_open and pool_close to suit with new variables for HBA.
authorUser yamaguti <yamaguti at pgfoundry.org>
Thu, 1 Feb 2007 16:40:35 +0000 (16:40 +0000)
committerUser yamaguti <yamaguti at pgfoundry.org>
Thu, 1 Feb 2007 16:40:35 +0000 (16:40 +0000)
pool_stream.c

index dc5073a1a8d100ad5c5cecc032d963b89627174a..6634091793f5db6831957da04933f891bffbe2dd 100644 (file)
@@ -83,6 +83,12 @@ POOL_CONNECTION *pool_open(int fd)
        cp->sbufsz = 0;
 
        cp->fd = fd;
+
+       memset((void *) &cp->raddr, 0, sizeof(cp->raddr));
+       cp->auth_arg = NULL;
+       cp->database = NULL;
+       cp->username = NULL;
+
        return cp;
 }
 
@@ -100,6 +106,12 @@ void pool_close(POOL_CONNECTION *cp)
                free(cp->buf2);
        if (cp->isbackend)
                pool_discard_params(&cp->params);
+       if (cp->auth_arg)
+               free(cp->auth_arg);
+       if (cp->database)
+               free(cp->database);
+       if (cp->username)
+               free(cp->username);
        free(cp);
 }