mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Fix a couple of small memory leaks on failure cases.
[CID 1234702, 1234703]
This commit is contained in:
parent
c4d0d30bf3
commit
ed8f020e20
2 changed files with 5 additions and 0 deletions
|
@ -1201,6 +1201,10 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len,
|
|||
tor_free(password);
|
||||
connection_printf_to_buf(conn, "515 Authentication failed: %s\r\n", errstr);
|
||||
connection_mark_for_close(TO_CONN(conn));
|
||||
if (sl) { /* clean up */
|
||||
SMARTLIST_FOREACH(sl, char *, cp, tor_free(cp));
|
||||
smartlist_free(sl);
|
||||
}
|
||||
return 0;
|
||||
ok:
|
||||
log_info(LD_CONTROL, "Authenticated control connection ("TOR_SOCKET_T_FORMAT
|
||||
|
|
|
@ -576,6 +576,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force)
|
|||
microdesc_wipe_body(md);
|
||||
}
|
||||
}
|
||||
smartlist_free(wrote);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue