aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-10-11 10:29:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-10-11 10:29:25 +0000
commit85174ed358307a611dfa796315ab3485b2a38c3d (patch)
tree60a67261a8dc222d71496d4944a16d4e9cfeec83
parent111d1d09d3f9e6cea3ec89fadc028dd75b8a7b98 (diff)
memory leak adjusts
-rw-r--r--lib/highlevel.c1
-rw-r--r--lib/http.c3
-rw-r--r--lib/urldata.h6
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/highlevel.c b/lib/highlevel.c
index b290d9ff6..add9735b8 100644
--- a/lib/highlevel.c
+++ b/lib/highlevel.c
@@ -722,6 +722,7 @@ CURLcode curl_transfer(CURL *curl)
/* TBD: set the URL with curl_setopt() */
data->url = data->newurl;
data->newurl = NULL; /* don't show! */
+ data->bits.urlstringalloc = TRUE; /* the URL is allocated */
/* Disable both types of POSTs, since doing a second POST when
following isn't what anyone would want! */
diff --git a/lib/http.c b/lib/http.c
index 6c247792c..551fac339 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -254,7 +254,8 @@ CURLcode http_done(struct connectdata *conn)
*bytecount = http->readbytecount + http->writebytecount;
}
- /* TBD: the HTTP struct remains allocated here */
+ free(http);
+ data->proto.http=NULL; /* it is gone */
return CURLE_OK;
}
diff --git a/lib/urldata.h b/lib/urldata.h
index 87e49a840..e5fcf16ff 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -304,16 +304,18 @@ struct Configbits {
bool mute;
bool no_body;
bool proxy_user_passwd;
- bool proxystringalloc; /* the http proxy string is malloc()'ed */
bool set_port;
bool set_range;
- bool rangestringalloc; /* the range string is malloc()'ed */
bool upload;
bool use_netrc;
bool user_passwd;
bool verbose;
bool this_is_a_follow; /* this is a followed Location: request */
bool krb4; /* kerberos4 connection requested */
+
+ bool proxystringalloc; /* the http proxy string is malloc()'ed */
+ bool rangestringalloc; /* the range string is malloc()'ed */
+ bool urlstringalloc; /* the URL string is malloc()'ed */
};
/* What type of interface that intiated this struct */