Fix use of uninitialized variable

This commit is contained in:
Mukund Sivaraman 2009-09-23 07:47:20 +05:30
parent 0dda30295e
commit c8be0250cd

View File

@ -102,7 +102,7 @@ char *reverse_rewrite_url (struct conn_s *connptr, hashmap_t hashofheaders,
char *rewrite_url = NULL; char *rewrite_url = NULL;
char *cookie = NULL; char *cookie = NULL;
char *cookieval; char *cookieval;
struct reversepath *reverse; struct reversepath *reverse = NULL;
/* Reverse requests always start with a slash */ /* Reverse requests always start with a slash */
if (*url == '/') { if (*url == '/') {
@ -153,7 +153,7 @@ char *reverse_rewrite_url (struct conn_s *connptr, hashmap_t hashofheaders,
log_message (LOG_CONN, "Rewriting URL: %s -> %s", url, rewrite_url); log_message (LOG_CONN, "Rewriting URL: %s -> %s", url, rewrite_url);
/* Store reverse path so that the magical tracking cookie can be set */ /* Store reverse path so that the magical tracking cookie can be set */
if (config.reversemagic) if (config.reversemagic && reverse)
connptr->reversepath = safestrdup (reverse->path); connptr->reversepath = safestrdup (reverse->path);
return rewrite_url; return rewrite_url;