discardServer need to free memory attached to the server structure.

Ming Fu <[email protected]>
Newsgroups gmane.comp.web.polipo.user
Message-ID <[email protected]>
Hi,

There is a number of malloc memories attached to server. These memory are
allocated in getServer function. They need to be freed.

***************
*** 124,129 ****
--- 125,139 ----
              previous = previous->next;
          previous->next = server->next;
      }
+       /*
+          * Need to free structures attached to the server
+       */
+     if (server->connection)
+        free(server->connection);
+     if (server->idleHandler)
+        free(server->idleHandler);
+     if (server->name)
+        free(server->name);

      free(server);
  }

BTW, is there a way to control the total number of servers besides
shortening the serverExpireTime?

Regards,
Ming
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.