Date: Mon, 5 Dec 2022 00:30:36 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f4db390553ba - main - netmap tests: Reset ctx->nmctx to NULL in nmreq_parsing. Message-ID: <202212050030.2B50Uasm069666@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f4db390553ba9db752865f5a42c36b062fdb03f2 commit f4db390553ba9db752865f5a42c36b062fdb03f2 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-12-05 00:29:25 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-12-05 00:29:25 +0000 netmap tests: Reset ctx->nmctx to NULL in nmreq_parsing. This avoids leaking a pointer to the on-stack test_nmctx which triggers a -Wdangling-pointer warning from GCC. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37536 --- tests/sys/netmap/ctrl-api-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/netmap/ctrl-api-test.c b/tests/sys/netmap/ctrl-api-test.c index 7cd4d6ac6d9b..8c87760217c3 100644 --- a/tests/sys/netmap/ctrl-api-test.c +++ b/tests/sys/netmap/ctrl-api-test.c @@ -1974,6 +1974,7 @@ nmreq_parsing(struct TestContext *ctx) ret = -1; } } + ctx->nmctx = NULL; return ret; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212050030.2B50Uasm069666>