memory leak in client code

Mel Hatzis <[email protected]>
Newsgroups gmane.comp.bug-tracking.gnats.general
Message-ID <[email protected]>
Please review the patch below which fixes a memory leak
with client reads from the server.

The memory leak generally results in 'unable to allocate memory'
(or 'unable to reallocate memory') errors particularly when
a 'query-pr --full' is attempted on a relatively large PR
database.

--
Mel Hatzis


Index: client.c
===================================================================
RCS file: /cvsroot/gnats/gnats/gnats/client.c,v
retrieving revision 1.46
diff -b -u -p -r1.46 client.c
--- client.c    25 Nov 2002 13:58:33 -0000      1.46
+++ client.c    12 May 2003 21:57:58 -0000
@@ -263,6 +263,7 @@ read_server (FILE *outfp)
             }
           fprintf (outfp, "%s", recvline + i);
         }
+      free (recvline);
      }
  }
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.