diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-10 20:16:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-10 20:16:37 -0400 |
commit | 391ef5e42cc79982a28aaaf22e9f9b255f6910d3 (patch) | |
tree | d74890dd83d9bc00d54d0a517b3a56423144a907 | |
parent | c4dd38e625a105a5d5d29242a8531da9677c98d8 (diff) | |
download | tor-391ef5e42cc79982a28aaaf22e9f9b255f6910d3.tar.gz tor-391ef5e42cc79982a28aaaf22e9f9b255f6910d3.zip |
Explain why we use raw_free with getdelim result.
-rw-r--r-- | src/feature/dircache/dirserv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c index 57de6ab8ed..1500467ec0 100644 --- a/src/feature/dircache/dirserv.c +++ b/src/feature/dircache/dirserv.c @@ -2682,8 +2682,10 @@ dirserv_read_measured_bandwidths(const char *from_file, rv = 0; err: - if (line) + if (line) { + // we need to raw_free this buffer because we got it from tor_getdelim() raw_free(line); + } if (fp) fclose(fp); return rv; |