projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s@declarded@declared@
[privoxy.git]
/
urlmatch.c
diff --git
a/urlmatch.c
b/urlmatch.c
index
30445d3
..
77c6391
100644
(file)
--- a/
urlmatch.c
+++ b/
urlmatch.c
@@
-1,4
+1,4
@@
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.3
8 2008/04/18 05:17:18
fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.3
9 2008/04/22 16:27:42
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
@@
-33,6
+33,10
@@
const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.38 2008/04/18 05:17:18 fabianke
*
* Revisions :
* $Log: urlmatch.c,v $
*
* Revisions :
* $Log: urlmatch.c,v $
+ * Revision 1.39 2008/04/22 16:27:42 fabiankeil
+ * In parse_http_request(), remove a pointless
+ * temporary variable and free the buffer earlier.
+ *
* Revision 1.38 2008/04/18 05:17:18 fabiankeil
* Mark simplematch()'s parameters as immutable.
*
* Revision 1.38 2008/04/18 05:17:18 fabiankeil
* Mark simplematch()'s parameters as immutable.
*
@@
-532,7
+536,7
@@
jb_err parse_http_url(const char * url,
http->host = strdup(host);
http->host = strdup(host);
- free(buf);
+ free
z
(buf);
if (http->host == NULL)
{
if (http->host == NULL)
{
@@
-640,7
+644,7
@@
jb_err parse_http_request(const char *req,
n = ssplit(buf, " \r\n", v, SZ(v), 1, 1);
if (n != 3)
{
n = ssplit(buf, " \r\n", v, SZ(v), 1, 1);
if (n != 3)
{
- free(buf);
+ free
z
(buf);
return JB_ERR_PARSE;
}
return JB_ERR_PARSE;
}
@@
-656,14
+660,14
@@
jb_err parse_http_request(const char *req,
if (unknown_method(v[0]))
{
log_error(LOG_LEVEL_ERROR, "Unknown HTTP method detected: %s", v[0]);
if (unknown_method(v[0]))
{
log_error(LOG_LEVEL_ERROR, "Unknown HTTP method detected: %s", v[0]);
- free(buf);
+ free
z
(buf);
return JB_ERR_PARSE;
}
err = parse_http_url(v[1], http, csp);
if (err)
{
return JB_ERR_PARSE;
}
err = parse_http_url(v[1], http, csp);
if (err)
{
- free(buf);
+ free
z
(buf);
return err;
}
return err;
}
@@
-1375,7
+1379,7
@@
int match_portlist(const char *portlist, int port)
*/
if (port == atoi(min))
{
*/
if (port == atoi(min))
{
- free(portlist_copy);
+ free
z
(portlist_copy);
return(1);
}
}
return(1);
}
}
@@
-1388,7
+1392,7
@@
int match_portlist(const char *portlist, int port)
*max++ = '\0';
if(port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535))
{
*max++ = '\0';
if(port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535))
{
- free(portlist_copy);
+ free
z
(portlist_copy);
return(1);
}
return(1);
}
@@
-1408,7
+1412,7
@@
int match_portlist(const char *portlist, int port)
}
}
}
}
- free(portlist_copy);
+ free
z
(portlist_copy);
return 0;
}
return 0;
}