expat/xmlwf readfilemap.c,1.9,1.10

"Karl Waclawek" <[email protected]>
Newsgroups gmane.text.xml.expat.cvs
Message-ID <[email protected]>
Update of /cvsroot/expat/expat/xmlwf
In directory sc8-pr-cvs1:/tmp/cvs-serv28223

Modified Files:
	readfilemap.c 
Log Message:
Fixed memory leak.

Index: readfilemap.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/readfilemap.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- readfilemap.c	1 Jul 2002 15:13:01 -0000	1.9
+++ readfilemap.c	20 Nov 2002 16:20:10 -0000	1.10
@@ -61,11 +61,13 @@
   n = read(fd, p, nbytes);
   if (n < 0) {
     perror(name);
+    free(p);
     close(fd);
     return 0;
   }
   if (n != nbytes) {
     fprintf(stderr, "%s: read unexpected number of bytes\n", name);
+    free(p);
     close(fd);
     return 0;
   }
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.