From 054e6e1335d00a862fd7467afe38438731f642af Mon Sep 17 00:00:00 2001 From: Eric van Gyzen Date: Mon, 28 May 2018 03:05:01 +0000 Subject: [PATCH] bhyve: fix small memory leak in virtio console Reported by: Coverity CID: 1363284 Sponsored by: Dell EMC --- usr.sbin/bhyve/pci_virtio_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c index bb49695ddd70..f3b1a029dcfa 100644 --- a/usr.sbin/bhyve/pci_virtio_console.c +++ b/usr.sbin/bhyve/pci_virtio_console.c @@ -651,7 +651,7 @@ pci_vtcon_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) while ((opt = strsep(&opts, ",")) != NULL) { portname = strsep(&opt, "="); - portpath = strdup(opt); + portpath = opt; /* create port */ if (pci_vtcon_sock_add(sc, portname, portpath) < 0) {