diff options
author | Alexander Færøy <ahf@torproject.org> | 2018-06-23 11:28:00 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2018-06-23 13:10:57 +0200 |
commit | 3395de51a01aa5519c52404ed2bb9c8cda3571c9 (patch) | |
tree | 9a79a82d54a8ef3f680ca7c77edcae0576ee5539 | |
parent | dcbfee246f35970f65d08a4555e25b956b9aba9c (diff) | |
download | tor-3395de51a01aa5519c52404ed2bb9c8cda3571c9.tar.gz tor-3395de51a01aa5519c52404ed2bb9c8cda3571c9.zip |
Fix memory leak in disk_state_parse_commits().
This patch fixes a memory leak in disk_state_parse_commits() where if
commit is NULL, we continue the internal loop, but without ever freeing
the args variable.
See: Coverity CID 1437441.
-rw-r--r-- | src/or/shared_random_state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/shared_random_state.c b/src/or/shared_random_state.c index 87db9031ee..8438d46404 100644 --- a/src/or/shared_random_state.c +++ b/src/or/shared_random_state.c @@ -409,6 +409,7 @@ disk_state_parse_commits(sr_state_t *state, if (commit == NULL) { /* Ignore badly formed commit. It could also be a authority * fingerprint that we don't know about so it shouldn't be used. */ + smartlist_free(args); continue; } /* We consider parseable commit from our disk state to be valid because |