help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memory leak in client code


From: Mel Hatzis
Subject: memory leak in client code
Date: Mon, 12 May 2003 15:02:46 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

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);
     }
 }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]