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.
@@ -864,6 +864,7 @@ decode_link_specifiers(const char *encoded)
sizeof(hs_spec->u.legacy_id));
break;
default:
+ tor_free(hs_spec);
goto err;
}