소스 검색

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.
Alexander Færøy 7 년 전
부모
커밋
3d80c086be
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/or/hs_descriptor.c

+ 1 - 0
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;
     }