Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2021 23:09:27 GMT
From:      Lutz Donnerhacke <donner@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b50a4dce1854 - main - libalias: Avoid uninitialized expiration
Message-ID:  <202107022309.162N9RPj090774@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by donner:

URL: https://cgit.FreeBSD.org/src/commit/?id=b50a4dce185481bebf8096c27588ae04a4a2fd7c

commit b50a4dce185481bebf8096c27588ae04a4a2fd7c
Author:     Lutz Donnerhacke <donner@FreeBSD.org>
AuthorDate: 2021-07-02 23:02:53 +0000
Commit:     Lutz Donnerhacke <donner@FreeBSD.org>
CommitDate: 2021-07-02 23:09:18 +0000

    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
---
 sys/netinet/libalias/alias_db.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c
index 19529271f49f..9f8c6064d2a7 100644
--- a/sys/netinet/libalias/alias_db.c
+++ b/sys/netinet/libalias/alias_db.c
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107022309.162N9RPj090774>