1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-01 01:41:50 -05:00

memory leak adjusts

This commit is contained in:
Daniel Stenberg 2000-10-11 10:29:25 +00:00
parent 111d1d09d3
commit 85174ed358
3 changed files with 7 additions and 3 deletions

View File

@ -722,6 +722,7 @@ CURLcode curl_transfer(CURL *curl)
/* TBD: set the URL with curl_setopt() */ /* TBD: set the URL with curl_setopt() */
data->url = data->newurl; data->url = data->newurl;
data->newurl = NULL; /* don't show! */ 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 /* Disable both types of POSTs, since doing a second POST when
following isn't what anyone would want! */ following isn't what anyone would want! */

View File

@ -254,7 +254,8 @@ CURLcode http_done(struct connectdata *conn)
*bytecount = http->readbytecount + http->writebytecount; *bytecount = http->readbytecount + http->writebytecount;
} }
/* TBD: the HTTP struct remains allocated here */ free(http);
data->proto.http=NULL; /* it is gone */
return CURLE_OK; return CURLE_OK;
} }

View File

@ -304,16 +304,18 @@ struct Configbits {
bool mute; bool mute;
bool no_body; bool no_body;
bool proxy_user_passwd; bool proxy_user_passwd;
bool proxystringalloc; /* the http proxy string is malloc()'ed */
bool set_port; bool set_port;
bool set_range; bool set_range;
bool rangestringalloc; /* the range string is malloc()'ed */
bool upload; bool upload;
bool use_netrc; bool use_netrc;
bool user_passwd; bool user_passwd;
bool verbose; bool verbose;
bool this_is_a_follow; /* this is a followed Location: request */ bool this_is_a_follow; /* this is a followed Location: request */
bool krb4; /* kerberos4 connection requested */ 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 */ /* What type of interface that intiated this struct */