]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Backport: Fix numerous memory leaks: some were almost impossible to trigger, and...
authorNick Mathewson <nickm@torproject.org>
Fri, 5 Sep 2008 20:54:52 +0000 (20:54 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 5 Sep 2008 20:54:52 +0000 (20:54 +0000)
svn:r16781

src/or/connection_edge.c
src/or/directory.c
src/or/rendcommon.c

index 0197d05c31cfd02346fc1f2930c60fa6000cd4ea..b42dadf49c00bc6e64c7696f98d983c96a909386 100644 (file)
@@ -696,6 +696,8 @@ clear_trackexithost_mappings(const char *exitname)
       MAP_DEL_CURRENT(address);
     }
   } STRMAP_FOREACH_END;
+
+  tor_free(suffix);
 }
 
 /** Remove all entries from the addressmap that were set via the
index 6e2ccb605f01f60ff4eff42974798b5df898ea6a..9cdf4606acc291e9ba85804ed75eb7fa657b2a64 100644 (file)
@@ -2806,7 +2806,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
      * receive anything. */
     write_http_status_line(conn, 400, "Nonauthoritative directory does not "
                            "accept posted server descriptors");
-    return 0;
+    goto done;
   }
 
   if (authdir_mode_handles_descs(options, -1) &&
index e7ac4a1f0fe949418307ba9fc1a0722708ce4115..dd91d4c40270cd48e01153b1bda1b3c92431e214 100644 (file)
@@ -884,6 +884,7 @@ rend_cache_store(const char *desc, size_t desc_len, int published)
   if (!published && strmap_get_lc(rend_cache, key)) {
     log_info(LD_REND, "We already have a v2 descriptor for service %s.",
              safe_str(query));
+    rend_service_descriptor_free(parsed);
     return -1;
   }
   /* report novel publication to statistics */