1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Applied Edward Sabol's patch from

<200106131813.f5DIDss1294858@alderaan.gsfc.nasa.gov>.
It fixes a memory leak in url_equal, and comments it out,
as it's unused.
This commit is contained in:
hniksic 2001-11-16 08:49:19 -08:00
parent 0ce7b6bffc
commit 0c42479322
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2001-06-08 Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov>
* url.c (url_equal): Fix a memory leak when parseurl returns an
error on the second URL. Also, since url_equal is not used at the
moment, do not compile it.
* url.h: Ditto for the prototype of url_equal.
2001-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
* html-parse.c (map_html_tags): Support XML-style empty tags.

View File

@ -774,6 +774,8 @@ str_url (const struct urlinfo *u, int hide)
Returns 1 if the URL1 is equivalent to URL2, 0 otherwise. Also
return 0 on error. */
/* Do not compile unused code. */
#if 0
int
url_equal (const char *url1, const char *url2)
{
@ -792,6 +794,7 @@ url_equal (const char *url1, const char *url2)
err = parseurl (url2, u2, 0);
if (err != URLOK)
{
freeurl (u1, 1);
freeurl (u2, 1);
return 0;
}
@ -800,6 +803,7 @@ url_equal (const char *url1, const char *url2)
freeurl (u2, 1);
return res;
}
#endif /* 0 */
urlpos *
get_urls_file (const char *file)

View File

@ -104,7 +104,10 @@ int skip_uname PARAMS ((const char *));
uerr_t parseurl PARAMS ((const char *, struct urlinfo *, int));
char *str_url PARAMS ((const struct urlinfo *, int));
/* url_equal is not currently used. */
#if 0
int url_equal PARAMS ((const char *, const char *));
#endif /* 0 */
urlpos *get_urls_file PARAMS ((const char *));
urlpos *get_urls_html PARAMS ((const char *, const char *, int, int *));