Explorar el Código

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 hace 7 años
padre
commit
3d80c086be
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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;
     }