Update of /cvsroot/monetdb/pathfinder/runtime
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31120/runtime
Modified Files:
Tag: M5XQ
shttpd.c
Log Message:
propagated changes of Monday Jan 04 2010
from the XQFT branch to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2010/01/04 - sjoerd: runtime/shttpd.c,1.37.16.1
propagated changes of Saturday Dec 26 2009 - Monday Jan 04 2010
from the development trunk to the XQFT branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/12/26 - stmane: runtime/shttpd.c,1.38
propagated changes of Wednesday Dec 23 2009 - Saturday Dec 26 2009
from the Nov2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/12/23 - sjoerd: runtime/shttpd.c,1.37.12.1
Fix resource leak.
Found by Coverity.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/12/23 - sjoerd: runtime/shttpd.c,1.37.12.2
Free in case of error.
Found by Coverity.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: shttpd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/shttpd.c,v
retrieving revision 1.37
retrieving revision 1.37.6.1
diff -u -d -r1.37 -r1.37.6.1
--- shttpd.c 6 Jun 2008 13:31:07 -0000 1.37
+++ shttpd.c 4 Jan 2010 15:22:01 -0000 1.37.6.1
@@ -564,8 +564,10 @@
}
/* Return if not all POST data buffered */
- if (c->nposted < c->cclength || c->cclength == 0)
+ if (c->nposted < c->cclength || c->cclength == 0) {
+ free(arg);
return;
+ }
/* Null-terminate query data */
c->query[c->cclength] = '\0';
@@ -2761,14 +2763,17 @@
{
struct mimetype *p;
- /* XXX possible resource leak */
if ((p = calloc(1, sizeof(*p))) != NULL &&
(p->ext = mystrdup(ext)) != NULL &&
(p->mime = mystrdup(mime)) != NULL) {
p->extlen = strlen(p->ext);
p->next = mimetypes;
mimetypes = p;
- }
+ } else if (p) {
+ if (p->ext) free(p->ext);
+ if (p->mime) free(p->mime);
+ free(p);
+ }
}
/*
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins