diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-11-20 16:22:46 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-11-20 16:22:46 +0000 |
commit | b4ea6136a4c91348fd632ad177f0a55e2423c66a (patch) | |
tree | 734bf1bcf3c320fc3f07f8dfd28106367bb1c339 /src/or/dirserv.c | |
parent | aef64c12772aa9f484f05fb3de85406f7d9ac5be (diff) | |
download | tor-b4ea6136a4c91348fd632ad177f0a55e2423c66a.tar.gz tor-b4ea6136a4c91348fd632ad177f0a55e2423c66a.zip |
r9345@totoro: nickm | 2006-11-20 11:22:10 -0500
Fix a small and unlikely memory leak in dirserv.c. I think this is not the one arma is looking for.
svn:r8971
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index a9cd0c4eab..260f0d443b 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -91,17 +91,19 @@ add_fingerprint_to_dir(const char *nickname, const char *fp, tor_assert(fp); tor_assert(list); - fingerprint = tor_strdup(fp); + fingeprint = tor_strdup(fp); tor_strstrip(fingerprint, " "); if (base16_decode(d, DIGEST_LEN, fingerprint, strlen(fingerprint))) { log_warn(LD_DIRSERV, "Couldn't decode fingerprint \"%s\"", escaped(fp)); + tor_free(fingerprint); return 0; } if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME)) { log_warn(LD_DIRSERV, "Tried to add a mapping for reserved nickname %s", UNNAMED_ROUTER_NICKNAME); + tor_free(fingerprint); return 0; } |