Date: Mon, 3 Oct 2022 23:11:35 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: 2fb81691b02f - main - bhyve: Don't free an invalid pointer. Message-ID: <202210032311.293NBZxI065914@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=2fb81691b02f27fa938f311835a8c6704c5cf80f commit 2fb81691b02f27fa938f311835a8c6704c5cf80f Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-10-03 23:10:44 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-10-03 23:10:44 +0000 bhyve: Don't free an invalid pointer. The netmap-specific data stored at be->opaque is freed by the caller on error as part of freeing be. Reviewed by: markj Reported by: GCC -Wfree-nonheap-object Differential Revision: https://reviews.freebsd.org/D36828 --- usr.sbin/bhyve/net_backends.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 0f1db7c8cfeb..adb3006f415b 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -695,7 +695,6 @@ netmap_init(struct net_backend *be, const char *devname, if (priv->nmd == NULL) { WPRINTF(("Unable to nm_open(): interface '%s', errno (%s)", devname, strerror(errno))); - free(priv); return (-1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210032311.293NBZxI065914>