]> granicus.if.org Git - pgbouncer/commitdiff
do memset in pgsocket init due to slab changes
authorMarko Kreen <markokr@gmail.com>
Wed, 23 Jan 2008 16:07:51 +0000 (16:07 +0000)
committerMarko Kreen <markokr@gmail.com>
Wed, 23 Jan 2008 16:07:51 +0000 (16:07 +0000)
src/objects.c

index 78d9b1c14cf7c197a269d73c93f1e1615bad3a18..853abfe43e39b5ab19d98d6398cc12489639bf3f 100644 (file)
@@ -67,6 +67,7 @@ static void construct_client(void *obj)
 {
        PgSocket *client = obj;
 
+       memset(client, 0, sizeof(PgSocket));
        list_init(&client->head);
        sbuf_init(&client->sbuf, client_proto, client);
        client->state = CL_FREE;
@@ -76,6 +77,7 @@ static void construct_server(void *obj)
 {
        PgSocket *server = obj;
 
+       memset(server, 0, sizeof(PgSocket));
        list_init(&server->head);
        sbuf_init(&server->sbuf, server_proto, server);
        server->state = SV_FREE;