libalias: Avoid uninitialized expiration

The expiration time of direct address mappings is explicitly
uninitialized.  Expire times are always compared during housekeeping.
Despite the uninitialized value does not harm, it's simpler to just
set it to a reasonable default.  This was detected during valgrinding
the test suite.

MFC after:	3 days
This commit is contained in:
Lutz Donnerhacke 2021-07-03 01:02:53 +02:00
parent 5866c369e4
commit b50a4dce18

View File

@ -613,8 +613,6 @@ AddLink(struct libalias *la, struct in_addr src_addr, struct in_addr dst_addr,
case LINK_FRAGMENT_PTR:
lnk->expire.time = FRAGMENT_PTR_EXPIRE_TIME;
break;
case LINK_ADDR:
break;
default:
lnk->expire.time = PROTO_EXPIRE_TIME;
break;