projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get_url_actions(): Don't initialize actions when called the second time
[privoxy.git]
/
urlmatch.c
diff --git
a/urlmatch.c
b/urlmatch.c
index
f1742c8
..
d953263
100644
(file)
--- a/
urlmatch.c
+++ b/
urlmatch.c
@@
-6,7
+6,7
@@
* patterns.
*
* Copyright : Written by and Copyright (C) 2001-2014
* patterns.
*
* Copyright : Written by and Copyright (C) 2001-2014
- * the Privoxy team. http://www.privoxy.org/
+ * the Privoxy team. http
s
://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
*
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
@@
-1440,20
+1440,23
@@
jb_err parse_forwarder_address(char *address, char **hostname, int *port,
char **username, char **password)
{
char *p;
char **username, char **password)
{
char *p;
- *hostname = strdup_or_die(address);
+ char *tmp;
+
+ tmp = *hostname = strdup_or_die(address);
/* Parse username and password */
if (username && password && (NULL != (p = strchr(*hostname, '@'))))
{
*p++ = '\0';
/* Parse username and password */
if (username && password && (NULL != (p = strchr(*hostname, '@'))))
{
*p++ = '\0';
- *username =
*hostname
;
- *hostname =
p
;
+ *username =
strdup_or_die(*hostname)
;
+ *hostname =
strdup_or_die(p)
;
if (NULL != (p = strchr(*username, ':')))
{
*p++ = '\0';
*password = strdup_or_die(p);
}
if (NULL != (p = strchr(*username, ':')))
{
*p++ = '\0';
*password = strdup_or_die(p);
}
+ freez(tmp);
}
/* Parse hostname and port */
}
/* Parse hostname and port */