summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-02-07 10:17:20 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-02-07 10:17:20 +0000
commitfec5c99b1ed32d9f49cda6f62dc0ee7581a5114f (patch)
treef84b207e5f7d8c94e3ba96ee61104a7266061dbb /usr.sbin
parent000ab557e6de31cee4f0c422790e3e3782ec4285 (diff)
avoid a double free in an error path
ok stefan@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/virtio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/vmd/virtio.c b/usr.sbin/vmd/virtio.c
index afb59c8a846..56de8244f96 100644
--- a/usr.sbin/vmd/virtio.c
+++ b/usr.sbin/vmd/virtio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio.c,v 1.8 2016/01/16 08:55:40 stefan Exp $ */
+/* $OpenBSD: virtio.c,v 1.9 2016/02/07 10:17:19 jsg Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -340,7 +340,6 @@ vioblk_do_write(struct vioblk_dev *dev, off_t sector, char *buf, ssize_t sz)
if (write(dev->fd, buf, sz) != sz) {
log_warn("vioblk write error");
- free(buf);
return (1);
}