diff options
author | Alexander Færøy <ahf@torproject.org> | 2018-06-23 11:54:36 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2018-06-23 11:54:36 +0200 |
commit | 3d80c086bea3b0d93327c30ac620740b629cb294 (patch) | |
tree | 21d11f13454a9591b28a6b70c4337db405174905 | |
parent | b39c50cde8b1d7e3e27d5a6fc2e58ff208982637 (diff) | |
download | tor-3d80c086bea3b0d93327c30ac620740b629cb294.tar.gz tor-3d80c086bea3b0d93327c30ac620740b629cb294.zip |
Fix memory leak in decode_link_specifiers().
This patch fixes a memory leak in decode_link_specifiers() where the
hs_spec variable might leak if the default label is taken in the
switch/case expression.
See: Coverity CID 1437437.
-rw-r--r-- | src/or/hs_descriptor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c index 938b7a77df..15bdd14d55 100644 --- a/src/or/hs_descriptor.c +++ b/src/or/hs_descriptor.c @@ -864,6 +864,7 @@ decode_link_specifiers(const char *encoded) sizeof(hs_spec->u.legacy_id)); break; default: + tor_free(hs_spec); goto err; } |