Преглед на файлове

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;
     }