mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
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
This commit is contained in:
parent
aef64c1277
commit
b4ea6136a4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user