diff options
author | mlarkin <mlarkin@openbsd.org> | 2019-09-24 12:14:54 +0000 |
---|---|---|
committer | mlarkin <mlarkin@openbsd.org> | 2019-09-24 12:14:54 +0000 |
commit | 1e93267c1d1e1f2ac51c3c279037cdd761f4e76b (patch) | |
tree | d34ea80422e756870c964a6de491568538530cbd /usr.sbin/vmd | |
parent | vmd(8): virtio.c whitespace removal (diff) | |
download | wireguard-openbsd-1e93267c1d1e1f2ac51c3c279037cdd761f4e76b.tar.xz wireguard-openbsd-1e93267c1d1e1f2ac51c3c279037cdd761f4e76b.zip |
vmd(8): fix memory leak in virtio network TX path.
ok reyk, mpi, benno, tb
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r-- | usr.sbin/vmd/virtio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/vmd/virtio.c b/usr.sbin/vmd/virtio.c index 2d10e170a90..e1c49fe7209 100644 --- a/usr.sbin/vmd/virtio.c +++ b/usr.sbin/vmd/virtio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio.c,v 1.78 2019/09/24 12:12:46 mlarkin Exp $ */ +/* $OpenBSD: virtio.c,v 1.79 2019/09/24 12:14:54 mlarkin Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -1533,6 +1533,9 @@ vionet_notify_tx(struct vionet_dev *dev) num_enq++; idx = dev->vq[TXQ].last_avail & VIONET_QUEUE_MASK; + + free(pkt); + pkt = NULL; } if (write_mem(q_gpa, vr, vr_sz)) { |