]> sjero.net Git - wget/blobdiff - src/html-url.c
[svn] Committed memory debugging stuff.
[wget] / src / html-url.c
index 0441b470c2891c95a86b4709330aca6cf88bf38d..5d37cf0ad981f0690611812a49fbb67430670ecb 100644 (file)
@@ -348,12 +348,11 @@ handle_link (struct collect_urls_closure *closure, const char *link_uri,
   newel->size = tag->attrs[attrid].value_raw_size;
 
   /* A URL is relative if the host and protocol are not named, and the
-     name does not start with `/'.
-     #### This logic might need some rethinking.  */
+     name does not start with `/'.  */
   if (no_proto && *link_uri != '/')
-    newel->flags |= (URELATIVE | UNOPROTO);
-  else if (no_proto)
-    newel->flags |= UNOPROTO;
+    newel->link_relative_p = 1;
+  else if (!no_proto)
+    newel->link_complete_p = 1;
 
   if (closure->tail)
     {
@@ -417,7 +416,7 @@ collect_tags_mapper (struct taginfo *tag, void *arg)
            if (!newbase)
              break;
            if (closure->base)
-             free (closure->base);
+             xfree (closure->base);
            if (closure->parent_base)
              closure->base = url_concat (closure->parent_base, newbase);
            else
@@ -567,3 +566,10 @@ get_urls_html (const char *file, const char *this_url, int dash_p_leaf_HTML,
   read_file_free (fm);
   return closure.head;
 }
+
+void
+cleanup_html_url (void)
+{
+  FREE_MAYBE (interesting_tags);
+  FREE_MAYBE (interesting_attributes);
+}